mirror of
https://github.com/Team-Resurgent/DockerCron.git
synced 2026-08-15 02:18:18 -07:00
19 lines
385 B
Bash
19 lines
385 B
Bash
#!/bin/bash
|
|
|
|
if [ -z "$SCHEDULER_ENVIRONMENT" ]; then
|
|
echo "SCHEDULER_ENVIRONMENT not set, assuming Development"
|
|
SCHEDULER_ENVIRONMENT="Development"
|
|
fi
|
|
|
|
# Select the crontab file based on the environment
|
|
CRON_FILE="crontab.$SCHEDULER_ENVIRONMENT"
|
|
|
|
echo "Loading crontab file: $CRON_FILE"
|
|
|
|
# Load the crontab file
|
|
crontab $CRON_FILE
|
|
|
|
# Start cron
|
|
echo "Starting cron..."
|
|
crond -f
|