自动保存90的crontab
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 line
221 B

  1. #!/usr/bin/env bash
  2. BACKUP_DIRECTORY="/home/crontab_backup"
  3. if [ ! -e "${BACKUP_DIRECTORY}" ]; then
  4. mkdir -p ${BACKUP_DIRECTORY}
  5. fi
  6. crontab -l > ${BACKUP_DIRECTORY}/$(date '+%Y%m%d%H%M%S').txt
  7. #sh ./gitrun.sh