Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. 0 0 30 3 ? 2011 /command
  2.  
  3. echo /usr/bin/the_command options | at now + 1 day
  4.  
  5. 0 0 2 12 * /home/adm/bin/the_command options
  6.  
  7. #! /bin/bash
  8.  
  9. COMMAND=/home/adm/bin/the_command
  10. DONEYET="${COMMAND}.alreadyrun"
  11.  
  12. export PATH=/usr/bin:$PATH
  13.  
  14. if [[ -f $DONEYET ]]; then
  15. exit 1
  16. fi
  17. touch "$DONEYET"
  18.  
  19. # Put the command you want to run exactly once here:
  20. echo 'You will only get this once!' | mail -s 'Greetings!' me@example.com
  21.  
  22. echo /usr/bin/the_command options | at now + 1 day
  23.  
  24. 0 0 2 12 * crontab -r ; /home/adm/bin/the_command options
  25.  
  26. * * * 5 * /path/to/comand_to_execute; /usr/bin/crontab -l | /usr/bin/grep -iv command_to_execute | /usr/bin/crontab -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement