Author Topic: Windows alternative for Cron Jobs  (Read 1587 times)

0 Members and 1 Guest are viewing this topic.

Online chrisdburnsTopic starter

  • Devotee
  • Posts: 1,054
  • Gender: Male
    • View Profile
    • Stooney Dot Com
Windows alternative for Cron Jobs
« on: August 06, 2008, 10:46:35 PM »
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)
<embed src='.wav' autostart='true' loop='false'
width='2' height='0'>
</embed>
i found that ERMMMMM thats called PHP!!!!

Offline thorpe

  • Administrator
  • 'Mind Boggling!'
  • *
  • Posts: 29,255
    • View Profile
Re: Windows alternative for Cron Jobs
« Reply #1 on: August 06, 2008, 10:50:07 PM »
There is such a thing as scheduler built right into windows. Should be in control panel somewhere.

Offline tibberous

  • Devotee
  • Posts: 1,177
    • View Profile
    • Trent Tompkins.com
Re: Windows alternative for Cron Jobs
« Reply #2 on: August 06, 2008, 10:58:56 PM »
Is scheduler the most reliable? :P

Online chrisdburnsTopic starter

  • Devotee
  • Posts: 1,054
  • Gender: Male
    • View Profile
    • Stooney Dot Com
Re: Windows alternative for Cron Jobs
« Reply #3 on: August 06, 2008, 11:50:08 PM »
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.)
<embed src='.wav' autostart='true' loop='false'
width='2' height='0'>
</embed>
i found that ERMMMMM thats called PHP!!!!

Offline neylitalo

  • Staff Alumni
  • Addict
  • *
  • Posts: 2,970
  • Gender: Male
    • View Profile
    • The Netizen's Journal
Re: Windows alternative for Cron Jobs
« Reply #4 on: August 07, 2008, 12:11:32 AM »
Use the php binary. Should be somewhere in your PHP installation directory.
http://nealylitalo.net - My personal website, and home of The Netizen's Journal.

Online chrisdburnsTopic starter

  • Devotee
  • Posts: 1,054
  • Gender: Male
    • View Profile
    • Stooney Dot Com
Re: Windows alternative for Cron Jobs
« Reply #5 on: August 07, 2008, 12:15:03 AM »
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:
Code: [Select]
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)
Code: [Select]
ini_set('include_path', 'c:/xampp/htdocs/test/test1');
« Last Edit: August 07, 2008, 12:15:39 AM by chrisdburns »
<embed src='.wav' autostart='true' loop='false'
width='2' height='0'>
</embed>
i found that ERMMMMM thats called PHP!!!!

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: Windows alternative for Cron Jobs
« Reply #6 on: August 07, 2008, 01:05:50 AM »
Or you can set the 'start in' path and not have to set the include path.
Why doesn't anyone ever say hi, hey, or whad up world?

Offline ardyandkari

  • Devotee
  • Posts: 501
  • Established Slacker
    • View Profile
Re: Windows alternative for Cron Jobs
« Reply #7 on: August 07, 2008, 08:05:17 AM »
interesting, how does this run the script automatically every so often like a cron?
Quote from: Barand
An it dont hurt if yer can write proper to cos bein abel to communicate is impotent

Quote from: Crayon Violent
So that's what happened: You were chilling with your friend Tom.  Aliens attacked.  Tom made a b-line towards the big red button, while you fended off aliens with your standard government issued marbles.

Online chrisdburnsTopic starter

  • Devotee
  • Posts: 1,054
  • Gender: Male
    • View Profile
    • Stooney Dot Com
Re: Windows alternative for Cron Jobs
« Reply #8 on: August 07, 2008, 03:09:39 PM »
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. 
<embed src='.wav' autostart='true' loop='false'
width='2' height='0'>
</embed>
i found that ERMMMMM thats called PHP!!!!