Hello guys, I’ve been experimenting with Oban lately, and I am wondering what is the most appropriate way to start a scheduled job right now. Should I modify the database, or is there a more fitting way to execute this?
Are you saying that the job is already scheduled for some future time, but you want to change that and start it now? If so, I think the easiest thing is to change the scheduled at time to
DateTime.utc_now(), I’m pretty sure that will allow it to be started immediately.
Yeah, I want to start the scheduled jobs right now. I was thinking there was some sort of command, but I guess I’ll create a function for starting all the scheduled jobs that have the retryable state directly with Ecto.
You want to retry a bunch of jobs all at once? Is this something you’re doing all the time or a one off situation? You can retry individual jobs with the UI if this is a one off situation. That isn’t ideal if you have dozens or hundreds of retries, of course.
It is a one off situation from a bug that has caused the jobs to fail constantly, so a few have several attempts already and are schedule for tomorrow and I want to retry them today. I’m aware of the scheduling after every attempt, but this was unexpected situation…