Making something happen at a designated time?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MattSharp
Forum Commoner
Posts: 62
Joined: Wed Apr 24, 2002 2:25 pm

Making something happen at a designated time?

Post by MattSharp »

I am making a program that should notify users 24 horus prior to their scheduled time. How could I do this?
toms100
Forum Contributor
Posts: 119
Joined: Wed Feb 26, 2003 10:29 am
Location: Bristol,UK

Post by toms100 »

when you say program you mean php script yes?
of you have access to a cron job you could make a script run every how then loop thru a database full of scheduled times. if it sees one that is scheduled 24 hours or less away it sends a msg to a user then deletes the schedule (so it doesnt loop thru again)
MattSharp
Forum Commoner
Posts: 62
Joined: Wed Apr 24, 2002 2:25 pm

Post by MattSharp »

toms100 wrote:when you say program you mean php script yes?
of you have access to a cron job you could make a script run every how then loop thru a database full of scheduled times. if it sees one that is scheduled 24 hours or less away it sends a msg to a user then deletes the schedule (so it doesnt loop thru again)
Is there anyway to not use a cron job? Or to control cron jobs from within PHP?
Post Reply