Closed asravankumar closed 1 week ago
Hi @asravankumar, you can use Periodic Task Dynamic with the GetConfigs
implementation that will be fetched at every interval (configurable). For the payload, you can use a map
, DB
, or something else to keep the data dynamic. Every time a task is executed, you need to update the data in the map
, DB
, or other storage solution.
I have a requirement, where i require the scheduled time of a task in the handler. For example, I have a task A which is scheduled to invoke every day, then in the task handler I need the scheduled time to tag the task invocation to that day.
For the same, I did the following. I passed the scheduledAt as part of the payload. While registering the task in the scheduler, I gave the time.Now().UTC() to get the current time.
You can see above while registering, I created the task with current time. What i see is for the all the invocations of this task, the scheduledAt value is constant and is basically the time at which that code has been executed.
I think my approach might be wrong.. Please help me in two things,