Jump to content


This topic is now archived and is closed to further replies.


Setting up a scheduled task to run a PHP file

Recommended Posts

I would like to run a simple php file that backs up my database.  The file is in one of the virtual directories. 

I know I can do it with other ways, but I'm interested in how to do it on a windows OS, and using the windows scheduled tasks wizard - if possible.

I've read that parameters need to be set up, but I don't quite understand what that means.

Does anyone know how I can do this in a simple step by step fashion?


Share this post

Link to post
Share on other sites
Got it figured out!

The best way to do this is to create a batch file that includes php.exe and the php file that needs to be executed:

C:\php\php.exe C:\apache2\htdocs\emailscript.php

then I set up the scheduled task to run the .bat file when I need it.

Next thing to figure out is how to set up a cron job on linux to do the same thing.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.