Skip to content

Instantly share code, notes, and snippets.

@jonabaptistella
Forked from eaydin/cronadd.sh
Created August 21, 2018 11:45
Show Gist options
  • Select an option

  • Save jonabaptistella/4586fd5cbe33cb7c19e2e14de96dfe5f to your computer and use it in GitHub Desktop.

Select an option

Save jonabaptistella/4586fd5cbe33cb7c19e2e14de96dfe5f to your computer and use it in GitHub Desktop.
BASH scripting way of adding Cronjob
#!/bin/bash
command=”/path-to/my_process.sh > /dev/null 2>&1″
job=”*/5 * * * * $command”
cat <(grep -i -v “$command” <(crontab -l)) <(echo “$job”) | crontab -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment