Size: 970
Comment:
|
← Revision 12 as of 2025-10-17 10:05:30 ⇥
Size: 1088
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
<<TableOfContents(2)>> | |
Line 4: | Line 5: |
* crontab -e # edit cron for current user * crontab -l # list cron for current user |
{{{#!highlight sh crontab -e # edit cron for current user crontab -l # list cron for current user }}} |
Line 8: | Line 11: |
{{{ | |
Line 9: | Line 13: |
}}} | |
Line 11: | Line 16: |
{{{ | |
Line 12: | Line 18: |
}}} | |
Line 14: | Line 21: |
{{{ | |
Line 15: | Line 23: |
}}} | |
Line 17: | Line 26: |
{{{ | |
Line 18: | Line 28: |
}}} | |
Line 20: | Line 31: |
{{{ | |
Line 21: | Line 33: |
}}} | |
Line 24: | Line 36: |
{{{ | {{{#!highlight sh |
Line 29: | Line 41: |
{{{ | {{{#!highlight sh |
Contents
crontab
Cron is a time-based scheduling service in Linux / Unix-like computer operating systems.
Every ten minutes
*/10 * * * * /path/to/command
Every hour
0 * * * * /path/to/command
Every 2 hours
0 */2 * * * /path/to/command
Once a day at midnight
0 0 * * * /path/to/command
Once a day at eight am
0 8 * * * /path/to/command
Annotations
1 string meaning
2 ------ -------
3 @reboot Run once, at startup.
4 @yearly Run once a year, "0 0 1 1 *".
5 @annually (same as @yearly)
6 @monthly Run once a month, "0 0 1 * *".
7 @weekly Run once a week, "0 0 * * 0".
8 @daily Run once a day, "0 0 * * *".
9 @midnight (same as @daily)
10 @hourly Run once an hour, "0 * * * *".