Cron Related


#1

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?


#2

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?


Cut the code, [color=#CC0000]it’s their birthday:[/color] [color=#00CC00]9999 => $99.99 Off[/color]


#3

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.


#4

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 …


Cut the code, [color=#CC0000]it’s their birthday:[/color] [color=#00CC00]9999 => $99.99 Off[/color]


#5

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.


#6

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.