Chat Server and Time Delay

B

Brian

Hi All

It's been a little while since I did some Perl coding
and the questions I have are a little over my head.
I need to write 2 scripts..........

First one sits on a server and runs without being called
from a browser. It's job is to check the time, and if
the time = X then do Y. basically I want a script that
is going to clear a MySQL Db at 4 am every day

The second is way over my head, in short I need
what is going to work like a chat server. The idea
is I have a windows based program (witting in Delphi)
that talks to a script, other uses of this program will
also will also log on. The program will create messages
and send them to the server script and in turn the
script will send that message to all the other programs
As I say just like a chat server except the messages are
done via the program and not the user
I have found a script on the net at
http://hotwired.lycos.com/webmonkey/97/18/index2a.html?tw=programming
but can't get it to work and don't really understand it.
Can anybody point me in the right direction or have
some example code?

Brian
 
M

Mark Clements

Brian said:
First one sits on a server and runs without being called
from a browser. It's job is to check the time, and if
the time = X then do Y. basically I want a script that
is going to clear a MySQL Db at 4 am every day
use cron, or the equivalent on windows (Scheduled Tasks?). This will automatically execute a
specified command according to whatever schedule you set.
The second is way over my head, in short I need
what is going to work like a chat server. The idea
I have found a script on the net at
http://hotwired.lycos.com/webmonkey/97/18/index2a.html?tw=programming
but can't get it to work and don't really understand it.
If you don't understand it then you're probably biting off more than you can chew. A quick look
at it shows that it seems to cover the main points quite well, though I haven't tested it. There
is a similar example in one of the books, though can't remember if it's the cookbook or
Programming Perl (they're at home).

Mark
 
B

Ben Morrow

Quoth Mark Clements said:
use cron, or the equivalent on windows (Scheduled Tasks?). This will
automatically execute a specified command according to whatever schedule you
set.

We seem to be getting this quite a lot atm. Would it be worth writing a
faq answer?

Ben
 
D

David K. Wall

Ben Morrow said:
We seem to be getting this quite a lot atm. Would it be worth
writing a faq answer?

It's not really a Perl problem, though, is it? Even if someone were to
write a "canned" response for it, I very much doubt it would be added
to the "official" Perl FAQ list. And what more can you say besides "use
cron or the equivalent on your OS"?
 
M

Mark Clements

David said:
It's not really a Perl problem, though, is it? Even if someone were to
write a "canned" response for it, I very much doubt it would be added
to the "official" Perl FAQ list. And what more can you say besides "use
cron or the equivalent on your OS"?
As you say, it isn't really a Perl problem, but it is a faq for the list and therefore probably
worthwhile. It could come under a section called somethings like "these aren't Perl questions
but here's how you solve them." It may give posters a hint as to what constitutes a non-Perl
question. That being said, you can lead a horse to water, but you can't make it drink.

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top