[PHP] Re: Dated/Timed actions
Stephane, One possibilety is to have a script which does the sending - checking against a db to see what to send out, having it called periodically from a cron job. I have built a (very) simple little daemon for doing jobs like this, it works similarly to cron except it is easier to programmaticly add and remove jobs. It also works on a linear time idea, rather than periodic like cron, so you can ask it to schedule a job a specific time offset from now, or at an absolute time (like cron). This is part of a package i've been working on for a while for defining managing processes like you describe below. Lukas Stephane Besnard [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, Does anybody know how to generate 'dated/timed actions' with PHP? By this I mean, for instance, automatically sending an email to a group of people when a specific date and time is reached: sending a happy birthday message to a users. Thanks, Stephane. _ Téléchargez MSN Explorer gratuitement à l'adresse http://explorer.msn.fr/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Dated/Timed actions
[EMAIL PROTECTED] (Stephane Besnard) wrote: Hi, Does anybody know how to generate 'dated/timed actions' with PHP? By this I mean, for instance, automatically sending an email to a group of people when a specific date and time is reached: sending a happy birthday message to a users. use a cronjob http://alt-php-faq.org/#id81 -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Dated/Timed actions
But what if your server can't give you cron perms? It would be useful if I could send an e·mail every monday... but can I do this without the cron? Thanks... and Hi!! to the group. I'm the New from Spain... ;) - Original Message - From: Henrik Hansen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 02, 2001 12:27 PM Subject: [PHP] Re: Dated/Timed actions [EMAIL PROTECTED] (Stephane Besnard) wrote: Hi, Does anybody know how to generate 'dated/timed actions' with PHP? By this I mean, for instance, automatically sending an email to a group of people when a specific date and time is reached: sending a happy birthday message to a users. use a cronjob http://alt-php-faq.org/#id81 -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Dated/Timed actions
On Tue, 2 Oct 2001, paharito wrote: But what if your server can't give you cron perms? It would be useful if I could send an e·mail every monday... but can I do this without the cron? Try at instead. -- Sapere aude My mind not only wanders, it sometimes leaves completely. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Dated/Timed actions
[EMAIL PROTECTED] (Duncan Hill) wrote: On Tue, 2 Oct 2001, paharito wrote: But what if your server can't give you cron perms? It would be useful if I could send an e·mail every monday... but can I do this without the cron? Try at instead. if you dont have cron access I dont think you have at perms either. maybe set a job up on your local computer? -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Dated/Timed actions
Well, it maybe posibble... but how can be it done by a php script? I mean: - The job is to send a mail to the mail-list of my web every monday, but I cannot use the crontab I think I can do this script: - At every visit at my index page, I check the system date, and if it is equal to 0:00am of monday, send the mail, and maybe, set a variable = 1 (1 means Send, for example), so the next visit won't active the script that sends the email... But if there are 2 simultaneos visits at 0:00am or mayor, the php will execute 2 times the script... so... is there a good script as efective as a cron job? Thanks :) PD: yes, my english sux XD - Original Message - From: Henrik Hansen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 02, 2001 2:27 PM Subject: Re: [PHP] Re: Dated/Timed actions [EMAIL PROTECTED] (Duncan Hill) wrote: On Tue, 2 Oct 2001, paharito wrote: But what if your server can't give you cron perms? It would be useful if I could send an e·mail every monday... but can I do this without the cron? Try at instead. if you dont have cron access I dont think you have at perms either. maybe set a job up on your local computer? -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Dated/Timed actions
[EMAIL PROTECTED] (Paharito) wrote: Well, it maybe posibble... but how can be it done by a php script? I mean: - The job is to send a mail to the mail-list of my web every monday, but I cannot use the crontab I think I can do this script: - At every visit at my index page, I check the system date, and if it is equal to 0:00am of monday, send the mail, and maybe, set a variable = 1 (1 means Send, for example), so the next visit won't active the script that sends the email... But if there are 2 simultaneos visits at 0:00am or mayor, the php will execute 2 times the script... so... is there a good script as efective as a cron job? cron is the superior when you need to do things like that. It's not effective to have a script running all the time checking for jobs. -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]