By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

Cron functionality under Windows XP

P: n/a
Hi there,

Can anyone tell if there's a solution to this for a Windows environment?
If this was running under Linux, it would be a problem, but...

I have a php script that when run, examines a file, and then updates a
local database. I would like to run this script (in the background - not
in a browser window) via the command line every e.g. 100 seconds - any
ideas?

Thanks in advance!

- Lee

Jul 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Tue, 26 Aug 2003 13:54:45 -0600 in
<message-id:3f**********@news3.es.net>
Leigh Riley <do*****************@home.org> wrote:
Hi there,

Can anyone tell if there's a solution to this for a Windows
environment? If this was running under Linux, it would be a problem,
but...

I have a php script that when run, examines a file, and then updates a

local database. I would like to run this script (in the background -
not in a browser window) via the command line every e.g. 100 seconds -
any ideas?

Thanks in advance!

- Lee

Lee,

I've never run PHP cmdline (especially on windoze) but...
windoze scheduler (in control panel) is equiv. of /etc/crontab
Not sure how you'd get this to run in the background though.. Perl for
windoze comes with wperl.exe to run things in the background.. not sure
about PHP though.. and no windoze box available for me to check on.
HT(possibly?)H =)

Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
Jul 16 '05 #2

P: n/a
Hi, thanks for your reply. Windows Scheduler will let me schedule stuff,
but not more often that once per day.

Ian.H [dS] wrote:
On Tue, 26 Aug 2003 13:54:45 -0600 in
<message-id:3f**********@news3.es.net>
Leigh Riley <do*****************@home.org> wrote:

Hi there,

Can anyone tell if there's a solution to this for a Windows
environment? If this was running under Linux, it would be a problem,
but...

I have a php script that when run, examines a file, and then updates a

local database. I would like to run this script (in the background -
not in a browser window) via the command line every e.g. 100 seconds -
any ideas?

Thanks in advance!

- Lee


Lee,

I've never run PHP cmdline (especially on windoze) but...
windoze scheduler (in control panel) is equiv. of /etc/crontab
Not sure how you'd get this to run in the background though.. Perl for
windoze comes with wperl.exe to run things in the background.. not sure
about PHP though.. and no windoze box available for me to check on.
HT(possibly?)H =)

Regards,

Ian


Jul 16 '05 #3

P: n/a

On 26-Aug-2003, Leigh Riley <do*****************@home.org> wrote:
Hi, thanks for your reply. Windows Scheduler will let me schedule stuff,
but not more often that once per day.


if you click the 'advanced' button on the schedule tab you can schedule as
often as every minute.

--
Tom Thackrey
www.creative-light.com
Jul 16 '05 #4

P: n/a
Leigh Riley <do*****************@home.org> wrote
in message news:<3f**********@news3.es.net>...

Can anyone tell if there's a solution to this for a Windows environment?
If this was running under Linux, it would be a problem, but...

I have a php script that when run, examines a file, and then updates a
local database. I would like to run this script (in the background - not
in a browser window) via the command line every e.g. 100 seconds - any
ideas?


A good old endlessly looping *.bat file will probably work...
Let's say you have these four lines in a file called script.bat:

:START
start php.exe your_PHP_script.php
choice /ty,100 > nul
goto START

This batch file would call your PHP script from the command line
(the script will be executed in the background), wait 100 seconds
(note that since you called 'start php.exe' rather than just
'php.exe', the delay will not include the script's execution time),
and do everything all over again.

All you have to do to endlessly run it in the background is to type:

start script.bat

in the command prompt.

Cheers,
NC
Jul 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.