How to create cron job that executes PHP script

2 posts / 0 new
Last post
#1 Sun, 05/16/2010 - 18:49
grantman16

How to create cron job that executes PHP script

I know there is a cron job module in Webmin, but it seems to be only for executing commands, not PHP scripts. How can I set up a cron job that executes a PHP script?

Also, does anyone know of a web-based GUI for creating PHP cron jobs? (like a phpMyAdmin of cron jobs)

Thanks!
Grant

Sun, 05/16/2010 - 21:32
andreychek

Howdy,

but it seems to be only for executing commands, not PHP scripts. How can I set up a cron job that executes a PHP script?

Cron executes "commands" -- that's all it's able to do :-) Anything you want cron to be able to do, you'd need to be able to execute from the command line as a command.

So the trick is to figure out how to accomplish what you want from the command line. It's possible to make a PHP script work from the command line. It's also possible to use something like wget to call a web page URL from within Cron.

-Eric

Topic locked