Originally posted by petenyce
also what does this mean ~/bin is that the root bin folder?
~/bin means the "bin" directory in the users home directory. ~/ always references the home directory. For a user account, this is usually /home/<username> and for the root user this is usually /root/
Shouldn't that be "/usr/sbin"?
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.hourly
22 4 * * 0 root run-parts /etc/cron.hourly
42 4 1 * 0 root run-parts /etc/cron.hourly
45 10 * * * ~/script.sh
This looks not quite right. If this is /etc/crontab you need to modify the last line:
45 10 * * * root ~/script.sh
The /etc/crontab has a slightly different syntax than the crontab you can edit with the command "crontab -e"
MINUTE HOUR DAY_OF_MONTH MONTH DAY OF WEEK USER COMMAND
that means that you can have commands in /etc/crontab run as any user you like.
MINUTE HOUR DAY_OF_MONTH MONTH DAY OF WEEK COMMAND
These commands can only run as the user that the crontab belongs to.