Storing schedules in a remote git respoitory



  • Hello,

    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 schedules file 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?

    Thanks!



  • Interesting...
    How about filtering in git that specific line for nextRun?
    I've never tried such a thing, but it seems possible
    https://stackoverflow.com/questions/16244969/how-to-tell-git-to-ignore-individual-lines-i-e-gitignore-for-specific-lines-of

    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 nextRun attribute, and instead, create a planned task entity. 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...


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.