Dynamically Changing CRON Schedule Based on System Settings #11095
Unanswered
jugalb-icpl
asked this question in
Q&A
Replies: 1 comment
-
Hi @jugalb-icpl, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’ve successfully created a CRON job that runs every 5 minutes, controlled via an enable/disable column in the system_settings table. This works as expected. However, I now want to make the CRON schedule configurable by adding another column to the same table (for dynamic timing).
Here’s what I’ve done so far:
Problem
The CRON job still runs on the default interval and doesn’t pick up the updated value. The strange part is that when I print the updated AI_CRON_TIME, the change is visible on the screen, meaning the value is being updated successfully in the code. However, the CRON timing itself doesn’t seem to reflect this change.
My Question:
How can I correctly modify the CRON timing dynamically from the system_settings table and have it reflect immediately in the CRON job? Is there a better approach to achieve this, or do I need to restart the Celery worker after changing the timing?
Any help or insights would be greatly appreciated!
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions