diff --git a/src/addCrontab.sh b/src/addCrontab.sh new file mode 100755 index 0000000..cf1a84e --- /dev/null +++ b/src/addCrontab.sh @@ -0,0 +1,14 @@ +#!/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