addet crontab script

This commit is contained in:
pika 2025-03-10 19:26:35 +01:00
parent b13938b773
commit 377bd7bc16

14
src/addCrontab.sh Executable file
View file

@ -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