opus
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
appear:
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!
Need a cron job?
Instead of the first five fields, one of eight special strings may
appear:
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!