summary: I have this system that creates jobs to be finished in given amount of time, could be 4 hours, could be 10 days, depends on the job itself. The client lately asked me to program a feature that would send him an email every time a job is due.
The logic thing to do would be creating a cron that would run only once and then be deleted, such a temporary, one-time-use cron.
Every time a job is filled and sent to the database, a cron will be set up to run one minute before due time of the job ( so if I start a 4-hr job at noon, the cron is set up to be executed at 3.59pm, and be removed right after )
I searched the net to find some solution, to no vail, though. I mean I have found few but they required some extra software to be installed on the server.
So another thing I would do is to create a cron that would run every fifteen minutes or so to look for any jobs that might be due in this 15-min span. This is totally do-able but still I would like to try something fancy ( ) if it’s even possible.
What do you think?
Any response will be appreciated. Thank you.