Andrew Jorgensen wrote:
Jacob Fugal wrote:

Richard Miller wrote:

How can I set up a program or module or something on a web server that will "wake up" at certain times and perform a task? I have an account with a web hosting company and feel like I've been learning enough PHP to do what I want through forms, but what if I want to have the server send me an email at a certain time? (For example, to send an email to my phone to remind me of an appointment.)

Really appreciate your help!



Cron jobs ('man crontab') are a good way to have something happen on a regular basis. I would suggest reading up on those whether that's really what you need or not.


As far as scheduling irregular tasks,


Irregular tasks can be scheduled with 'at'. You might have to write some scripts to add things to your at queue, but at will take care of making sure the email gets sent (or whatever).

I've suggested once that we have a meeting on crontab and at (as well as the tools you need to actually acomplish something that way). I know I don't know enough about them myself. I'm eager to learn.

Now that it's mentioned by Andrew and Gary, I have used 'at' before, and it worked pretty nice. I'd just completely forgotten about it.


Some questions about 'at' -- how does it manage the scheduled events? Are they written to disk, so if I reboot between now and the scheduled time, it will still happen? Once you've scheduled something, is there a way to review pending events and/or remove them? If 'at' handles both of these nicely, then I'm all for using it in place of the database for scheduling the future events -- no need to reinvent the wheel.

Jacob Fugal


____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to