aviraj
Deactivating quantum jobs
I have some quantum jobs configured as part of the elixir configuration
{‘MyJobs.Scheduler’,
[{timeout,10000},
{global,true},
{jobs,
[{post_schedule,
[{schedule,<<“10 7 * * *”>>},
{task,
{‘Post.PostSchedule’,
post_schedules,[]}}]},
{job_schedule,
[{schedule,<<“1 3 * * *”>>},
{task,
{‘Post.Reminders’,
post_reminders,[]}}]}]}]}
This is deployed on a server and all jobs run as per schedule. My requirement is to disable/deactivate these jobs on the server without doing a re-deployment of code. I have tried modifying the config file to remove this entire section from the config file, but even after restarting the server and starting the application again, it still runs the jobs at the scheduled times. Does quantum job scheduler pick the job configuration from some other location apart from the config files. Is it possible to stop/deactivate the jobs by making a configuration change or from the command line?
First Post!
derek-zhou
I am not familiar with quantum per se, but i suspect you hit a typical newbie problem like most of us encountered at some stage.
Whatever you put in config/config.exs are compile time config. What you want here is run time config, which you need to fetch the config data yourself, call whatever api yourself.







