472,780 Members | 3,657 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 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 1151
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.