addet crontab script
This commit is contained in:
parent
b13938b773
commit
377bd7bc16
1 changed files with 14 additions and 0 deletions
14
src/addCrontab.sh
Executable file
14
src/addCrontab.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue