caddydb/src/addCrontab.sh
2025-03-10 19:26:35 +01:00

14 lines
403 B
Bash
Executable file

#!/usr/bin/env bash
# ─< Check if the given command exists silently >─────────────────────────────────────────
command_exists() {
command -v "$@" >/dev/null 2>&1
}
scriptPath=""
if command_exists python3; then
echo "*/10 * * * * /usr/bin/python3 ${scriptPath}" | crontab -
else
echo "No python was found.."
fi