Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recurring Tasks - still confused #420

Open
Nilpointer opened this issue Nov 20, 2024 · 4 comments
Open

Recurring Tasks - still confused #420

Nilpointer opened this issue Nov 20, 2024 · 4 comments

Comments

@Nilpointer
Copy link

Hi,

I am still unsure how to manage reccuring tasks.

  • How do I delete them? ( I don't understand the provided solutions - sorry)
  • How can I pause them? Can I?
  • How can I update the schedule value at runtime with no downtime?

Can I simply edit the solid_queue_recurring_tasks schedule value or does this cause unwanted sideeffects?

Regards
Andreas

@rosa
Copy link
Member

rosa commented Nov 20, 2024

How do I delete them? ( I don't understand the provided solutions - sorry)

You delete them from your recurring.yml configuration (or another file if you are configuring them elsewhere).

How can I pause them? Can I?

No, pausing them is not supported. You'd need to remove them and then re-add them.

How can I update the schedule value at runtime with no downtime?

You'd need to have a no-downtime deploy as you need to update your configuration and deploy your code.

Can I simply edit the solid_queue_recurring_tasks schedule value or does this cause unwanted sideeffects?

This won't work in general because in most cases the scheduler will have the tasks already loaded from when it started, and then when it restarts, it'll read the configuration and would load any task there again, overwriting your changes in solid_queue_recurring_tasks.

@Nilpointer
Copy link
Author

Nilpointer commented Nov 20, 2024

Hi rosa!

How do I delete them? ( I don't understand the provided solutions - sorry)

You delete them from your recurring.yml configuration (or another file if you are configuring them elsewhere).

But how? If I remove the development node from my schedule.yml, restart the application - the entries in the solid_queue_recurring_tasks table are still there. Removing the two tasks under development having an empty development node also has no effect on the database.

development:
  periodic_import:
    class: CollectCsvJob
    schedule: every 99 months
  periodic_export:
    class: ExportJob
    schedule: at 12:03pm every day
staging:
  periodic_import:
    class: CollectCsvJob
    schedule: every 99 months
  periodic_export:
    class: ExportJob
    schedule: at 7pm every day
production:
  periodic_import:
    class: CollectCsvJob
    schedule: every 99 months
  periodic_export:
    class: ExportJob
    schedule: at 7pm every day

You'd need to have a no-downtime deploy as you need to update your configuration and deploy your code.

My application is running in kubernetes - the plan was to manage my schedule.yml as a config map to avoid new releases everytime i want to change the schedule. But then I need a way to trigger kind of an update (or restart the pod)

Thanks for your great support and work!

Regards
Andreas

@rosa
Copy link
Member

rosa commented Nov 20, 2024

But how? If I remove the development node from my schedule.yml, restart the application - the entries in the solid_queue_recurring_tasks table are still there.

Yes, sorry, they're there but it doesn't mean they're running. See #382. I'll change that so they get deleted as well when the scheduler reloads again. I just haven't had time this week.

@Nilpointer
Copy link
Author

Is there a way to inspect/query what jobs are currently scheduled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants