Click to See Complete Forum and Search --> : CRON and PHP


gsb
06-16-2003, 09:59 AM
I want to periodically run a php script.
I'm on a Linux box.
Although I'm not root on the server, I am "master of my domain."
Can I use 'cron' to run a php script?
...and if so, how do I setup and enter the 'crontab' entry?

This may be more of a Linux question but I'm developing this in php and thought some one here might know.

Thanks in advance.

gsb

pyro
06-16-2003, 10:46 AM
I've always used CPanel to set up my crons, so I'm not sure how to do it via the command line, but your crontab will probably look something like this:

0 0 * * * php /root/path/to/your/script.php

That will run every day at midnight (0 minute, 0 hour, every day, every month, every weekday)

gsb
06-16-2003, 10:53 AM
Thank you.
What is CPanel?

pyro
06-16-2003, 11:02 AM
CPanel provides a interface for users to control a web hosting account. http://www.cpanel.net

gsb
06-16-2003, 12:51 PM
Ah, yes.
I have that on another account not this one.
Thanks again.

pyro
06-16-2003, 01:03 PM
You bet...