You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, different jobs need to run periodically at different times, so I need to schedule the next function at somewhere in the future, it might be a couple of seconds, five minutes, etc. For instance, the job configured above could have this implementation in the Handle function:
I already tried scheduling the jobs using the EnqueueIn function using something like float64((time.Seconds * 2).Nanoseconds()), but I think EnqueueAt would be more convenient and easy to figure out.
Thanks in advance and I think it would be really nice if we can have a Wiki describing this kind of scenarios.
The text was updated successfully, but these errors were encountered:
Can somebody please explain to me how these functions work for scheduling a job?
Sorry if this doesn't qualify as issue, but there are no steps describing this kind of operations.
I have a list of job handlers that implement
jobFunc
, so initially I just enqueue different tasks to run periodically:The
handleJob
function just call theHandle
function in theJob
interface with the corresponding params:Now, different jobs need to run periodically at different times, so I need to schedule the next function at somewhere in the future, it might be a couple of seconds, five minutes, etc. For instance, the job configured above could have this implementation in the
Handle
function:The problem is that I don't know exactly how to schedule the next perform time either using
EnqueueAt
orEnqueueIn
functions.This is the output after running the code above, and as you guys can see, the jobs are scheduled to run after fifteen seconds:
I already tried scheduling the jobs using the
EnqueueIn
function using something likefloat64((time.Seconds * 2).Nanoseconds())
, but I thinkEnqueueAt
would be more convenient and easy to figure out.Thanks in advance and I think it would be really nice if we can have a Wiki describing this kind of scenarios.
The text was updated successfully, but these errors were encountered: