User Tools

Site Tools


cronjobs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cronjobs [2015/04/12 12:50] – created luke7858cronjobs [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
 === Format === === Format ===
 +__**Note**:__ When creating crons, you will need to specify the FULL path to a command. \\ 
 +Eg. On the command-line you may type: 
 +<sxh bash> 
 +holland bk 
 +</sxh> 
 +This is because bash shells introduced the $PATH environment variable: 
 +<sxh bash> 
 +# echo $PATH 
 +/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin 
 +</sxh> 
 +The shell will then search the environment variables from right to left until it finds the appropriate path. This allows you to type the command and options rather than the full path to the init script. \\ 
 +Cron DOES NOT have this functionality. You will need to type the full path: 
 +<sxh bash> 
 +# which holland 
 +/usr/sbin/holland 
 +</sxh> 
 +The cron would then look like: 
 +<sxh bash> 
 +00 2 * * * /usr/sbin/holland -q bk 
 +</sxh> 
 +\\ 
 +\\ 
 +=== Format ===
 To view the format of crontabs you can read the file /etc/crontab To view the format of crontabs you can read the file /etc/crontab
 <sxh bash> <sxh bash>
cronjobs.1428843047.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki