Files
iptv-docker/docker/php/dev/cron_entrypoint.sh
2025-05-06 11:36:10 +08:00

18 lines
499 B
Bash
Executable File

#!/bin/bash
echo "Current pwd: $(pwd)"
for file in "/etc/cron.d/iptv_jobs" "/var/www/iptv-cli"; do
if [ ! -f "$file" ]; then echo "Not found: $file" && exit 1; fi
done;
echo "Importing crontab /etc/cron.d/iptv_jobs:"
echo "======================="
cat /etc/cron.d/iptv_jobs
echo "======================="
crontab -n /etc/cron.d/iptv_jobs || exit 2
echo "Running cron with /etc/cron.d/iptv_jobs"
crontab /etc/cron.d/iptv_jobs
touch /var/log/cron.log
cron -L 15 && tail -fn 1 /var/log/cron.log