Did you find a solution?
Remove Jobs from Database queue
I'm looking to set up a system that sends out an email on a given day. Queued jobs seemed like the correct solution to this, using the delay. However, the email author should retain the ability to change when the email is sent out. I store the job ID, but after queueing a job to the database driver, there doesn't seem to be any way to get that job back out of the queue and delete it before it runs.
I 'could' manually do it with something like:
app('queue')->getDatabase()->table('jobs')->where('id', $job_id)->delete();
But it feels pretty dirty, and as if there should be a better way. IS there a better way to do it? Alternatively, am I just approaching this all wrong and there's a much better/ simpler way to trigger a job at a given time while still being able to cancel it any time beforehand?
Please or to participate in this conversation.