cron
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cron [2012/02/08 13:50] – [Special Usage] k2patel | cron [2020/08/10 02:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 27: | Line 27: | ||
==== Usage ==== | ==== Usage ==== | ||
Most common Usage terms defined as below. | Most common Usage terms defined as below. | ||
- | < | + | < |
<code bash> | <code bash> | ||
# Minute | # Minute | ||
Line 33: | Line 33: | ||
0 2 12 | 0 2 12 | ||
</ | </ | ||
+ | |||
+ | Also most of the time you might want to disable logging the output of commands or scripts you are running.\\ | ||
+ | Which can be used as follow. | ||
+ | |||
+ | <code bash> | ||
+ | 0 3 * * * bin/ | ||
+ | </ | ||
+ | |||
+ | Also some time you want to store output to file. it use standard notation for redirect.\\ | ||
+ | For Append **>> | ||
+ | For Overwrite **>** | ||
+ | |||
+ | <code bash> | ||
+ | 35 0 * * * /bin/bash / | ||
+ | </ | ||
+ | |||
+ | ==== Things need to know ==== | ||
+ | |||
+ | | ||
+ | * If the users account has a crontab but no useable shell in /etc/passwd then the cronjob will not run. You will have to give the account a shell for the crontab to run. | ||
+ | * If your cronjobs are not running check if the cron deamon is running. Then remember to check / | ||
+ | * | ||
+ | * Cron does not deal with seconds so you can't have cronjob' | ||
+ | * You can not use % in the command area. They will need to be escaped and if used with a command like the date command you can put it in backticks. Ex. `date +\%Y-\%m-\%d` | ||
+ | |||
+ | [[ http:// |
cron.1328709051.txt.gz · Last modified: 2020/08/10 02:29 (external edit)