SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2009
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Schedule PHP Script to Run in Background

    Hi,

    I have a php script on my local windows machine that I would like to run at scheduled times. When it runs I would like it to do so silently ie. in the background. I don't want browser windows and thnigs to be popping up because the machine will be getting used for other things as well.

    What is the best way to achieve this?

    I have wamp running on the machine.

    Thanks!

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    The best way would be to have the script be a command line ran script. By that I mean you would pass it directly to PHP. You can then use Task Scheduler to set it up.

    C:\>php.exe your-script.php
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Member
    Join Date
    Dec 2006
    Location
    Huddersfield, UK
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:
    http://www.phpjobscheduler.co.uk/

    Its free (open source) and allows you to specify several scripts which you to run at all different intervals.

  4. #4
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by seiretto View Post
    Try this:
    http://www.phpjobscheduler.co.uk/

    Its free (open source) and allows you to specify several scripts which you to run at all different intervals.
    That is a completely different thing and requires one to actually visit the page in question to get it to run any task.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  5. #5
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use Chron Jobs.

  6. #6
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mrlucky8ball View Post
    Use Chron Jobs.
    Windows does not support Cron.

  7. #7
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Andrew E. View Post
    Windows does not support Cron.
    Nope it doesn't. It offers something a lot more feature rich.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  8. #8
    SitePoint Enthusiast Mounty's Avatar
    Join Date
    Mar 2008
    Location
    UK
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could also use Pycron if you're running a win32 OS. It's much like the cron deamon used in linux:

    http://www.kalab.com/freeware/pycron/pycron.htm


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •