Cron Related

Cron Related

Posted by: perfectlyfailing
Posted on: 2007-01-10 15:16:00

I'm trying to get set up a cronjob. Here is what im doing:

From SSH: crontabs -e

0,10,20,30,40,50 * * * * /usr/local/bin/perl /home/perfectlyfailing/perfectlyfailing.com/mobilog/mobilog.pl

Adding the above
Saving it.
I check by doing crontabs -l it shows the entry yet 10 minutes passes and nothing happens.
No luck at all. Any suggestions?

Re: Cron Related

Posted by: anonymous2
Posted on: 2007-01-10 15:31:00

Are you expecting output, or what?

Try adding a MAILTO at the top of your crontab, to see if errors or output are produced.

Maybe your perl script assumes some environment setup that doesn't exist when run by cron?

Re: Cron Related

Posted by: perfectlyfailing
Posted on: 2007-01-10 15:37:00

The script itself should check my email & post to the site if I have email. But nothing is happening. If I run the script it works, but when i do it like this through crontabs to automatically do it, it doesnt.

You told me to add MAILTO. Do I just add that on a seperate line in my crontab file and thats it? What do I expect to see for results? Sorry im a n00b when it comes to this.
Edited by perfectlyfailing on 01/10/07 03:39 PM (server time).

Re: Cron Related

Posted by: anonymous2
Posted on: 2007-01-10 15:51:00

http://wiki.dreamhost.com/index.php/Crontab

Usually I put MAILTO=myaddress@example.com at the top. Without it, it should send to the user, but ...

Re: Cron Related

Posted by: perfectlyfailing
Posted on: 2007-01-10 16:00:00

So technically if everything goes as planned, if i put this MAILTO=myemail...it should email me something? Sorry, kinda slow!

Also I read the crontab thing in the wiki, but the formatting of my entry seems to be fine.Edited by perfectlyfailing on 01/10/07 04:05 PM (server time).

Re: Cron Related

Posted by: perfectlyfailing
Posted on: 2007-01-10 16:29:00

Alright, I figured out that Cron Daemon was emailing me regarding a script error I guess. I'm going to have to see if there is any info from the script creator about the error.

Tags: cronsshperlusrpl