NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
PatrikL
Oct 12, 2011Aspirant
Not getting cron to work
I've tried to get a script (importing torrent files from rss) executed once an hour by simply placing it in cron.hourly but nothing whatsoever happens. The script executes well manually when I'm logge...
sphardy1
Oct 13, 2011Apprentice
/etc/crontab defines the default jobs
2 things to note:
1. Scripts placed in the cron.hourly / cron.daily etc directories will be run automatically - no cron updates need be made. You can verify the scripts to be run with the 'run-parts' command
2. They will be run under a standard bourne shell (/bin/sh) so be sure that your script runs fine under that (standard login shell for the root user is bash, not bourne shell)
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
2 things to note:
1. Scripts placed in the cron.hourly / cron.daily etc directories will be run automatically - no cron updates need be made. You can verify the scripts to be run with the 'run-parts' command
2. They will be run under a standard bourne shell (/bin/sh) so be sure that your script runs fine under that (standard login shell for the root user is bash, not bourne shell)
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!