Schedule Jobs Using Crontab
Peter Lieverdink
peter at cc.com.au
Wed Nov 16 03:51:31 UTC 2005
Hakim Singhji wrote:
> Hi All,
>
> I have written a small shell script to pipe the output of fortune -s to
> my signature file. However, I would like to automate the rotation of
> this signature file to every 10 minutes. I am trying to use cron to do
> this however I am not having any luck. My /etc/crontab file looks as
> follows:
>
> Terminal:
> -----------------------------------------
> hzs202@##### ~? > sudo vi /etc/crontab
> SHELL=/bin/sh
> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/hzs202/bin
>
> # m h dom mon dow user command
> 10,20,30,40,50 * * * * test -x /usr/sbin/anacron || run-parts --report
> /home/hzs202/bin/sig
> -----------------------------------------
>
> This is not allowing cron to run the jobs... what exactly am I doing
> wrong here?
>
> Best,
> --
> Hakim Singhji
> New York University
>
> No one can feel as helpless as the owner of a sick goldfish.
rather then editing /etc/crontab, run 'crontab -e' and add:
10,20,30,40,50 * * * * test -x /usr/sbin/anacron || run-parts --report
/home/hzs202/bin/sig
That way it ends up in the user's own crontab list.
- P.
More information about the ubuntu-users
mailing list