PDA

View Full Version : Crontab, doesn't work.


daveyw
03-24-2007, 02:29 PM
Hello,

I want that the crontab loads "/root/mail" + send me an email.

The mail file:
MAILTO: my-address
./r http
./r mail
./r interworx
./r mysql
./r dns
Its a script what restarts services

The cmail file (crontab):
0 6 * * * /root/mail


Whats wrong with this, it doesn't load and doesn't mail me? When i run manually "/root/mail" it will load + mail me

Thank you

Catalyst
03-26-2007, 07:05 AM
You didn't define a user --- or did you do that with `crontab -e`? Regardless --- the safest way to do cron is to ignore all that crap, drop a file in /etc/cron.d/ and put the user in ... eg0 6 * * * root /root/mail

daveyw
03-26-2007, 09:57 AM
When i type "crontab cmail" and then i type "crontab -u root -l" then i see the crontab cmail. But he doesn't load it.