473,396 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Cron functionality under Windows XP

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
4 8208
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
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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: deko | last post by:
Is there a way to get my script to run on regularly scheduled intervals without using cron? My hosting provider sucks... cannot use cron... I was thinking perhaps I could create a file every hour...
4
by: Doug | last post by:
I have Windows XP professional. Is there ANYTHING reliable on Windows that is like cron on UNIX that will allow you run something at regular intervals, for example, like every 10 minutes? I...
19
by: Eric | last post by:
I'm trying to have some scripts run periodically on Windows XP and found the "Task Scheduler" did not execute my scripts. My scripts are of the form scriptName.py, and will run just by invoking that...
3
by: AR John | last post by:
Hi, Anybody could tell me how a mysql script could be run on mysql on some interval like cron facility in Linux system?. I am using Windows 2K machine. Actually I am developing a PHP...
6
by: Andrew Banks | last post by:
When I've developed PHP sites before we've had a server facility called a CRON job to set a certain page to run at pre-defined periods (schedule it) Is there an equvalent for ASP.NET/IIS? I've...
3
by: the.natalie | last post by:
Hi. I am a newbie to mysql, cron, and shell scripting, so please bear with me. I have a script that is used for updating an image directory based on contents in a database. The script does the...
7
by: Chopstick Head | last post by:
What, exactly, is a cron job? A PHP script that runs server side, nonstop?
1
by: pankajit09 | last post by:
Hello, I want to fire query at a database and then email the result to a user . This I want to do everyday automatically. I thought to use cron for it. If there is any other better way please...
1
by: Karthik Gurusamy | last post by:
Hi, I'm working on a cron like functionality for my application. The outer loops runs continuously waking every x seconds (say x=180, 300, ..). It needs to know what events in cron has expired...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.