473,387 Members | 1,364 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,387 software developers and data experts.

OT (possibly): Scheduled actions

I've got a dedicated server running Windows 2003, IIS, MySQL and PHP.

I'm working on a web site which needs to pick data up on a semi-regular
basis from a CSV file which will exist in a directory accessible to this
server. The data will be put there by another server.

I need to pick up this data and insert it into a MySQL table; I have three
options in theory - do it on a strict schedule, do it on request by an admin
user (the easy option), or have it happen automatically if a file drops into
that directory.

Can PHP do this, or do I need to look at something else to do this for me? I
can install/setup anything I like on this server, within reason.

TIA.

Pete.
Jul 17 '05 #1
3 1165
In article <cv*******************@news.demon.co.uk>,
"PeteC" <ne*************@removethisbitacutecomputing.co.uk > wrote:
I've got a dedicated server running Windows 2003, IIS, MySQL and PHP.

I'm working on a web site which needs to pick data up on a semi-regular
basis from a CSV file which will exist in a directory accessible to this
server. The data will be put there by another server.

I need to pick up this data and insert it into a MySQL table; I have three
options in theory - do it on a strict schedule, do it on request by an admin
user (the easy option), or have it happen automatically if a file drops into
that directory.

Can PHP do this, or do I need to look at something else to do this for me? I
can install/setup anything I like on this server, within reason.

TIA.

Pete.


Generally, php is a server-side web formatting and programming language.
It's meant to site between a browser and a web server. It _can_ be
built as a command-line utility on UNIX but I don't know about W2003.
You're better off doing this on Linux or using Perl.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #2

"PeteC" <ne*************@removethisbitacutecomputing.co.uk > wrote in message
news:cv*******************@news.demon.co.uk...
I've got a dedicated server running Windows 2003, IIS, MySQL and PHP.

I'm working on a web site which needs to pick data up on a semi-regular
basis from a CSV file which will exist in a directory accessible to this
server. The data will be put there by another server.

I need to pick up this data and insert it into a MySQL table; I have three
options in theory - do it on a strict schedule, do it on request by an admin user (the easy option), or have it happen automatically if a file drops into that directory.

Can PHP do this, or do I need to look at something else to do this for me? I can install/setup anything I like on this server, within reason.


The elegant solution would be to write a Windows service and have it monitor
the folder containing the file and spawn an instance of PHP CLI when the
file has changed. If you know C/C++ and Windows programming, it's not that
hard. You might also be able to find an existing freeware app that does
that.

You could also use the Schedule Task feature that you will find the Control
Panel to run PHP on a schedule.

Jul 17 '05 #3
PHP can be run from Windows 2003 as a command-line utility. The idea
that PHP is not very good as a shell scripting language is incorrect -
PHP is a very useful and a very capable alternative to bash, perl etc.
It's more portable than bash (although cygwin will allow you to run
bash on windows), and easier to maintain than perl. Really, what it
comes down to is what language you know best and which you can code
quickly. If you are more comfortable using PHP, then I can't think of
a single reason to use Perl for this.

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bart Simpson | last post by:
Hi, I want to control 'Scheduled Tasks' in Windows 2003 by python program. But I couldn't find any Python module about win32 'Scheduled Tasks'. I could find only Perl module about it. (see...
4
by: Colin Steadman | last post by:
We have a number of scheduled tasks on our IIS server that run daily at some point during the early morning. These tasks run as a specific user that has the correct permissions to perform whatever...
5
by: A. Lovhaug | last post by:
I have a console application built in the .NET Framework. This application basically executes an XCopy based on parameters that I pass to it. I use it for creating scripts for backing up folders,...
6
by: John Bowman | last post by:
Hi, I have a C# app that needs to launch the "Add Scheduled Tasks" wizard found in the control panel "Scheduled Tasks" applet. I realize that this "applet" really just opens the tasks folder,...
1
by: satelite | last post by:
Hello, I am writing an exe that is intended to be run via a scheduled task. However, I also need the flexibility to have users run the scheduled task manually (right click task and select run). ...
7
by: Rob Meade | last post by:
Hi all, I have a web application which gets *very* few hits, especially as its only just been launched, but even after that it'll be a "quiet" site. My problem is that when I am the first...
4
by: Jim Langston | last post by:
In my program I am accepting messages over the network and parsing them. I find that the function that does this has gotten quite big, and so want to break the if else code into functions. I...
1
by: Myster Edd | last post by:
I have a strange problem that I think deals with security on SQL 2005. I have a scheduled task that runs on a Windows 2000 machine. It calls a vb script which creates a connection to SQL Server. ...
0
by: Paulson | last post by:
Dear Freinds I want to make a program that acts as a reminder for the users.I need to open up the Scheduled task wizard programmatically.If you type Tasks in the run command the Tasks...
9
by: jdaelhousen | last post by:
I have a bit of a problem I'm hoping someone can shed some light on... I have a VB.Net console application written in VS 2003 that produces a .exe file that now sits on a Windows 2000 server...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.