Stooney Posted August 7, 2008 Share Posted August 7, 2008 So my home server runs on a windows xp machine (it's used for a lot more than a web server) and therefore doesn't have cron jobs available. (At least not the popular linux one). What is a reliable and free (oxymoron?) solution to run cron jobs on a windows machine? (mainly looking for actual opinions, I know google exists and have used it and formed a list of options, just looking for opinions from those who have worked with them) Quote Link to comment Share on other sites More sharing options...
trq Posted August 7, 2008 Share Posted August 7, 2008 There is such a thing as scheduler built right into windows. Should be in control panel somewhere. Quote Link to comment Share on other sites More sharing options...
tibberous Posted August 7, 2008 Share Posted August 7, 2008 Is scheduler the most reliable? Quote Link to comment Share on other sites More sharing options...
Stooney Posted August 7, 2008 Author Share Posted August 7, 2008 That is true, but it won't do what I need. All I need is to somehow automate the running of a php script every 30 seconds (1 min if necessary). Right now all I've found is a way to schedule firefox.exe to run and just set it's homepage to the script. That feels very wrong tool for the job ish. Plus I wouldn't know how to close the window aftwards. Any ideas? (note: I don't need a browser window opened or anything as there is no html output from the script. It just needs to run somehow.) Quote Link to comment Share on other sites More sharing options...
neylitalo Posted August 7, 2008 Share Posted August 7, 2008 Use the php binary. Should be somewhere in your PHP installation directory. Quote Link to comment Share on other sites More sharing options...
Stooney Posted August 7, 2008 Author Share Posted August 7, 2008 Alright I figured it out finally. I can just run the script via command prompt. Just had set the include path properly. To those curious about how to use command prompt: c:\xampp\htdocs\php\php.exe c:\xampp\htdocs\test\test1\test.php (if you use include or require in your scripts, use ini_set to set the include path, I had to at least) ini_set('include_path', 'c:/xampp/htdocs/test/test1'); Quote Link to comment Share on other sites More sharing options...
corbin Posted August 7, 2008 Share Posted August 7, 2008 Or you can set the 'start in' path and not have to set the include path. Quote Link to comment Share on other sites More sharing options...
ardyandkari Posted August 7, 2008 Share Posted August 7, 2008 interesting, how does this run the script automatically every so often like a cron? Quote Link to comment Share on other sites More sharing options...
Stooney Posted August 7, 2008 Author Share Posted August 7, 2008 interesting, how does this run the script automatically every so often like a cron? I used the built in windows scheduler to run the command mentioned above to repeat every 1 min for 24 hours everyday. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.