Skip to content

Instantly share code, notes, and snippets.

@eaydin
Created February 14, 2012 14:32
Show Gist options
  • Select an option

  • Save eaydin/1827106 to your computer and use it in GitHub Desktop.

Select an option

Save eaydin/1827106 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