mirror of
https://github.com/dokku/dokku.git
synced 2026-08-29 10:08:53 +02:00
Host-crontab generation for `app.json` cron tasks now lives in the `cron` plugin, gated by a new `scheduler-uses-host-cron` trigger that the `docker-local` scheduler answers true while self-managed schedulers such as `k3s` answer false. This lets any host-cron scheduler participate in normal `app.json` cron without coupling to `scheduler-docker-local` or duplicating the crontab writer, while the `k3s` scheduler continues to manage its own in-cluster cron jobs. Closes #8862.
18 lines
415 B
Bash
Executable File
18 lines
415 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
trigger-scheduler-null-scheduler-uses-host-cron() {
|
|
declare desc="reports whether the scheduler writes cron tasks to the host crontab"
|
|
declare trigger="scheduler-uses-host-cron"
|
|
declare DOKKU_SCHEDULER="$1"
|
|
|
|
if [[ "$DOKKU_SCHEDULER" != "null" ]]; then
|
|
return
|
|
fi
|
|
|
|
echo "false"
|
|
}
|
|
|
|
trigger-scheduler-null-scheduler-uses-host-cron "$@"
|