Storing schedules in a remote git respoitory
We are currently using a remote git repository to store reports and have come up with a CI/CD pipeline that supports deploying reports to different instances of jsreport. The only problem we are having is with committing schedules to the repository. Because the
schedulesfile includes the "nextRun" key, it makes it difficult to commit this.
My thought is to create an extension that converts a "yaml" version of the schedule that leaves out this information to the current version of the schedule. Then we will use a git hook to convert it back if changes are made to the schedule via the jsreport UI.
Before I go down this path, I was curious if there are any other suggestions on how to do this?
How about filtering in git that specific line for
I've never tried such a thing, but it seems possible
Do you see some technical solution we could implement directly in jsreport to improve this scenario in the future?
Maybe we could get rid of the
nextRunattribute, and instead, create a planned
taskentity. This is the entity that currently represents the schedule single run. If the schedule cron is changed, the planned task would be recreated. And we would be checking the planned tasks instead of the schedules' nextRun when looking for jobs to run.
Just thinking out loud...