cancel
Showing results for 
Search instead for 
Did you mean: 

Equivalent of cron jobs in windows?

michaelscott
Grafter
Posts: 594
Registered: 09-08-2007

Equivalent of cron jobs in windows?

Hi,

I'd like to be able to run a PHP script every 5 minutes - obviously i can't be at my computer all day and night to set the script off. Is there a way to do this in a similar way to unix cron jobs?

BTW, don't suggest using a refresh tag to make the browser reload every 5 mins - I don't want to have to leave the browser open.

Thanks,

Mike
4 REPLIES
N/A

Equivalent of cron jobs in windows?

Is Windows task scheduler no use? I don't use it but the folder is in Control Panel on my Win2k system.
michaelscott
Grafter
Posts: 594
Registered: 09-08-2007

Equivalent of cron jobs in windows?

No. It won't let me execute a script and it won't let you run something as frequently as every 5 minutes.
N/A

Equivalent of cron jobs in windows?

I run scripts fine on scheduler all the time.

Both console based Tcl, PHP, Batch and VB.

The best method is to use a Batch file to launch the needed actions. You call this, and does the work of changing dir and calling PHP where needed.

Add a task as normal. Use any old properties, as you need to manualy edit it anyhow.

Schedual task: Daily
Start time: 09:00am
Echedual daily task every: 1 days

Click the advanced button
Repeat task every "5" "minutes"
Duration: "23" hours, "59" minutes

In the setting Tab.
Enable the "Stop the task if it runs for:"
I suggest 4 mins

This will make sure the task is killed off, to allow the next 5 min cycle to occur. If the task is still running when the next cycle is due, launch is skipped.

I could likely find a program that will parse and run crontab style files.
michaelscott
Grafter
Posts: 594
Registered: 09-08-2007

Equivalent of cron jobs in windows?

thanks. i've just had a play and it can do everything i want Cheesy