nemanjan00 / schedulr

Constraint based cron-like scheduler.
1 stars 0 forks source link

State store. #1

Open joelabair opened 6 years ago

joelabair commented 6 years ago

Nice. I like the API goal.

What happens if the (main thread) process gets restarted? Is there any plans for persisting the schedulr's state somewhere?

nemanjan00 commented 6 years ago

My usecase does not require that.

I can write function to dump constraints as json.

Every constraint is calculated relative to time that is within that constraint, so, just reloading that json would make it identical.

joelabair commented 6 years ago

That would make it able to recover from a crash. Perhaps attach it to process.on(‘exit’) or something.

nemanjan00 commented 6 years ago

I do not think that should be default feature. Maybe I will create CLI version that autosaves config....

I see this as more of a library...

joelabair commented 6 years ago

Yea. That totally makes sense. The JSON export would be a convenient utility though.