Reputation: 107
I'm aware of cron jobs to execute commands at a certain time, but what if that time is not constant? For instance, suppose a user asks for a reminder email exactly 1hr after signing up for something, is there an easy way to go about doing this?
Timing is critical. I am actually trying to create AI that will essentially act on its own but only at variable points during the day. Any help would be appreciated!
Upvotes: 0
Views: 93
Reputation: 16051
Here a workable flow:
That is a simple example from the request. It might get a bit more complex then that.
EDIT : this suggestion might be good only if you need to be very precise with the time management!
Upvotes: 1
Reputation: 15579
if you dont wanna use the cron
triggers and you are not comfortable with them here are two php scheduling libraries..
Try them if you like:
Upvotes: 1
Reputation: 360672
You can use at
to schedule jobs for specific times. cron is for repeating jobs, at is for one-shot/oddball interval ones. Both have a resolution of 1 minute, though, so you can't specify a start period with seconds granularity.
The command's available on both Unix/Linux and Windows.
Upvotes: 2