Crontab
Best practice
Examples
PATH=PATH=/usr/local/sbin:/usr/local/bin:/usir/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games# m h dom mon dow command
# 00 16 * * * cd /home/YOUR_PROJECT && ./data-deploy.sh >>/home/YOUR_PROJECT/newest-log 2>&1
0 */2 * * * cd /home/YOUR_PROJECT && node ./YOUR_PROJECT.js >>/home/YOUR_PROJECT/newest-log 2>&1Time examples
00 16 * * *0 */2 * * * /home/username/test.shWrite logs to a file
Last updated