troubleshooting Question

Cron Job that runs php script every hour

Avatar of webdesigner_dk
webdesigner_dk asked on
LinuxApache Web ServerScripting Languages
5 Comments1 Solution473 ViewsLast Modified:
Hi,

I need help setting up a cron job on a server. The purpose of the cron job is to run a php script every hour. The script deletes the contents of some tables in a mySQL database.

I have tried to use the following (from this tutorial):

curl -s -o /dev/null http://www.domain.com/cleanup.php?clean=log

Even though the script runs nicely if I run it from a browser manually, the cron job doesn't run the script.

I have another cron job that works:

php -f /var/www/domain.com/public_html/shell/indexer.php -- reindexall >/dev/null 2>&1

I don't have access to the cPanel, so I have to tell my web hosting company to set up the job on the server.

Thanks!

Dio
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros