Topic awaiting preservation: making PHP send reminders...automatically! (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Deeetroit, MI. USA |
posted 12-02-2002 07:25
Ok, don't know if this is actually possible or not. I am working on a script that I'd like to have the capability of mailing info (through PHP if at all possible) to a user, reminding them of a particular thing (such as paying a bill before it is due). Can this be done without the prompting of user submitted data and/or triggers. I guess this would be similar to a cron job, but I was wondering if it could be done with PHP without having to do things from a server's command line. Any idears? |
Bipolar (III) Inmate From: the uterus |
posted 12-02-2002 08:51
Are you just saying that you what to send someone email using PHP? |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 12-02-2002 09:20
sorry thumper, but you will need a way to periodically call the php page that handles the sending of the mails -> a cron job. |
Paranoid (IV) Inmate From: Deeetroit, MI. USA |
posted 12-02-2002 09:48
Well TP, I figured as much... What are the ramifications on running a daily cron job off a secure area (admin area)? |
Bipolar (III) Inmate From: the uterus |
posted 12-02-2002 10:30
This is me just being, well, me, but could you somehow write a script that gets called when someone visits a page or numerous pages, preferably pages that get an ample amount of hits. This script would check if reminders needed to be sent out. But you would set the reminder threshold to a smaller amount of time due to that fact that the script will be called often. And because the script gets called often the amount of processing will be very small. |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 12-02-2002 13:12 |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-02-2002 17:22
As much as I love php for web development this is the kind of thing I usually do with perl and cronjob. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 12-02-2002 19:35
not that there is much difference whether you call a perl script, or a php script via a cron job. |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 12-02-2002 22:12
Bitdamaged - You can use PHP with cron as well. That's what we're doing at GN, and what I'm doing at http://www.macombsheriff.com/ for things like the weather, and the upcoming Homeland Defense Security Level. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-03-2002 18:31
It's trickier without cron but it could be done with a little perl deamon. Here's a quick hack for running a script once a day. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-03-2002 18:44
oh and be careful with that script a Sysadmin might shit if you fark it up |
Paranoid (IV) Inmate From: Deeetroit, MI. USA |
posted 12-04-2002 03:59
Thanks for the advices fellas, and for the code bitdamaged. I know this is something that my lazy ass could just do everyday (I work from home), but I am on this server-side automation kick and thought I'd see how feasible it was. |