Crontab not working


#1

I need to have a file called hlstats.pl running in the background for may server stats page
http://www.ne0nguy.com/hlstats/hlstats.php

I figured I would use crontab to keep it running every hour
My crontab file looks like this:
0 * * * * “perl hlstats/perl/hlstats.pl”

while in the Shell when I type “perl hlstats/perl/hlstats.pl” it works but the crontab never runs

can someone give me some tips on how to fix it?


#2

Have you tried the crontab using the full path starting from /home/username/ne0nguy.com/hlstats/hlstats.ph and the .ph is executable.

i.e. 0 * * * * perl “/home/username/ne0nguy.com/hlstats/hlstats.ph”

Norm


#3

ok ill try it
do you think it will work if i dont have a .ph file in that directory?


#4

No it is okay to have the .ph file where you want it.

I probably missed your ‘perl’ folder out by mistake so add that in and give the full path to the .ph file.


Norm


#5

Ok thanks man it turns out i just needed to have perl outside of the quotes

just for reference:
do you know how to stop a service that crontab is running?


#6

Do you mean to delete the crontab using crontab -e?
Just edit it out and save the crontab.

Or do you mean using ps aux and then using kill to kill your process?


Norm