Need help setting up cron

Nils Kassube kassube at gmx.net
Tue Jul 15 18:20:24 UTC 2008


Robert Dailey wrote:
> I'm currently running Ubuntu Server 8.04, and I am having difficulty
> getting the cron program to work.
>
> First, I tried adding the following to /etc/crontab:
>
> 30 12 * * * root /my/script/file
>
> For testing, I put in an hour & minute that was about 2 minutes ahead
> of the current time so I could see if it worked. First of all, I was
> not able to find a log file *anywhere* to tell me if the task was run
> or not. 

In /var/log/syslog I can see entries from CRON. While I'm using the 
desktop version, I don't think it should be different for the server 
version. If you don't see any entries, is cron running?

> Secondly, the script in question created a set of directories, 
> so I checked to see if those directories were created in order to
> verify if the script was run. However, I did not find the directories,
> which leads me to believe the script was not executed.

Usually I forget to make scripts executable. Can you run the script 
manually?

> I did a little more research on google and I tried doing "crontab -e"
> and putting the entry there, however it still did not work.

Don't forget: With "crontab -e" you create a crontab for the individual 
user who invoked the command. Therefore you should leave away the "root" 
portion of the entry to make it work.


Nils




More information about the ubuntu-users mailing list