...

View Full Version : Cron Setup



daemonkin
01-24-2008, 04:30 PM
Hi guys,

Already read through most of the old cron posts but I am still having problems making my Cron run.

I am using CPanel to run the script and am testing at 5 minute intervals every hour.

After some googling I have noticed that some posters are using wget rather than php.

Can someone please tell me if i am doing something wrong and if so what I can do to fix this:

/usr/bin/wget -q -t 5 /home/MYSITE/scripts/email.php

email.php just emails me to say that the job has run.

Any help appreciated

D.

srule_
01-24-2008, 04:45 PM
the cronjob must have the following format:


TERM="xterm"; /usr/bin/lynx -dump http://my-best-domain.com/cron.php

So you just need to put TERM="xterm"; /usr/bin/lynx -dump before the path of the script.

if you are still having trouble just open a new ticket with your web hose and Im sure they will get it working for you.

rfresh
01-24-2008, 09:31 PM
Did you run your script from a browser manually to make sure it works? That's the first step. Once you know its working that way then you can try running it as a cron job.

Two things to check:

1. Make sure you have #!/usr/bin/php at the top of your cron job.

2. Make sure your script has 755 permissions.

daemonkin
01-25-2008, 09:15 AM
I got it to work using the following:

wget -q http://site_name/scripts/test_cron.php

But If I want to put it in my CMS which has .htpasswd restriction can I place the username and password in the crontab using --user and --password or do I do it some other way?

D.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum