Nextdoor / ndscheduler

A flexible python library for building your own cron-like system, with REST APIs and a Web UI.
BSD 2-Clause "Simplified" License
1.08k stars 202 forks source link

Is it possible to backup ndscheduler jobs? #36

Closed noqcks closed 5 years ago

noqcks commented 5 years ago

I have a over 50 jobs running in ndscheduler running and want to run them on another instance with a new hard drive.

How do I retain my job schedule? Is it possible?

kartick commented 5 years ago

@noqcks - If your jobs are stored in a database, you should be able to backup your DB, and restore it on your instance (or better use a centralized DB) and NDS can pick up your jobs there. If you are asking about moving running jobs on to a new node, that's not possible with NDS.

In my case, in my server.SchedulerServer subclass, the code reads jobs from a JSON file (for version control purposes) and puts them in a SQLite DB. You could do something similar, but store it in a central DB?

noqcks commented 5 years ago

Ahh true. I didn't fully understand that database options were customizable.

For anyone reading this in the future, db options here: https://github.com/Nextdoor/ndscheduler/blob/master/ndscheduler/default_settings.py#L47-L83