January 5th, 2005, 02:29
I didnt know this...surprise, until Strog pointed it out to me. Thought this would be a good place to share this jewel.

Need a cron job?

Instead of the first five fields, one of eight special strings may

string meaning
------ -------
@reboot Run once, at startup.
@yearly Run once a year, "0 0 1 1 *".
@annually (same as @yearly)
@monthly Run once a month, "0 0 1 * *".
@weekly Run once a week, "0 0 * * 0".
@daily Run once a day, "0 0 * * *".
@midnight (same as @daily)
@hourly Run once an hour, "0 * * * *".

So, for those of you that are character impaired, and example:

@reboot /root/scripts/script.sh

Or whatever will run said script once at startup.

man 5 crontab has the info as well.

Thanks Strog!

January 5th, 2005, 10:27
mmmm. Thanks this is really good info!

January 6th, 2005, 18:33
yar, this is one of my favorite cron thingies. I think I read this somewhere on google a while ago have been using it since.