funkyfuture / deck-chores

A job scheduler for Docker containers, configured via labels.
https://deck-chores.readthedocs.io/
ISC License
197 stars 27 forks source link

Enhancement request: pre and post execution hook/script #119

Closed psyciknz closed 1 year ago

psyciknz commented 1 year ago

I’ve just started using healthchecks.io, but before that had calls to pushover built into some of my bash commands.

But what do you think about the ability to set a pre/post command as part of the job definition. Even if it’s just a script name.

For healthchecks.io you just run a curl command to a specific url. So that would be handy, but I think most versatile would be do define a pre script and/or post script where the user can write what they want.

So a definition might look like this:


deck-chores.job-ytdl.precommand: /user/script/on/docker.host
deck-chores.job-ytdl.command: bash -c "/config/runupdate.sh"
deck-chores.job-ytdl.cron: "* * * */6 1 0 "
deck-chores.job-ytdl.postcommand: /user/script/on/docker.host
funkyfuture commented 1 year ago

there are two ways that you can achieve what you want:

so, the versatility is there. no need to re-invent anything.