gjcarneiro / yacron

A modern Cron replacement that is Docker-friendly
MIT License
449 stars 38 forks source link

Feature Request: activate / deactivate Jobs #73

Closed andreas-wittig closed 1 year ago

andreas-wittig commented 1 year ago

Description

we use Yacron in Docker environments. A couple of the Job-configuration entries is generated or partly replaced through String-Operations at container startup. E.g. our yaml contains - name: job_myJob command: - /opt/myScript.sh schedule: "REPLACEME_AT_STARTUP"

The schedule in turn is configured through environment variables in a Kubernets cluster. We deliver just "Yacron-Yaml-Templates" to the container (following the above pattern).

The feature request: to make above overall-setups more easy it would be convient to have a new switch "active:[true|false]", Default=true for the Job-configuration. It is then possible to privide Default Job-Yamls and let activate single Jobs at container-startup-time through configuration.

gjcarneiro commented 1 year ago

I prefer enabled rather than active. "active" may be confused with "running".

 - name: job_myJob
   command:
     - /opt/myScript.sh
   schedule: "REPLACEME_AT_STARTUP"
   enabled: true|false (default true)
andreas-wittig commented 1 year ago

I agree fully! "enabled" is much more clearer.

gjcarneiro commented 1 year ago

fixed in 0.18