Schedule Jobs Using Crontab

David Hart ubuntu at tonix.org
Wed Nov 16 11:11:52 UTC 2005


On Wed, 2005-11-16 at 05:16 -0500, Hakim Singhji wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Filipe Bonjour wrote:
> > Looks to me like the 6th field should be the user, not the script name.
> > Here's a couple of lines I added to the crontab on another box that work
> > fine:
> 
> What do you mean the 6th field should be a user not a script name? Do
> you mean that I should create some kind of .crontab file and in
> /etc/crontab assign the user to be run? I'm not quite getting it.

The /etc/crontab file is the _system_ cron file, it needs a user defined
in the sixth field for the command to run as.  Look at this line from
your original post:

    # m h dom mon dow user  command

Notice that the sixth field is for the user and the command to be run is
the seventh.  For more info check 'man 5 crontab'

Really though, this is the wrong place to put _personal_ cron entries.
You should be putting them in your own cron which you can edit with the
command 'crontab -e'.  The '-e' option launches your editor defined in
the EDITOR or VISUAL environment variables (vi by default).

Check 'man crontab' for more.

-- 
David Hart <ubuntu at tonix.org>





More information about the ubuntu-users mailing list