Skip to content

Instantly share code, notes, and snippets.

@toshihirock
Last active August 29, 2015 14:17
Show Gist options
  • Save toshihirock/8f6b080fbc4ffa607bf1 to your computer and use it in GitHub Desktop.
Save toshihirock/8f6b080fbc4ffa607bf1 to your computer and use it in GitHub Desktop.
#!/bin/bash
dir=/etc/crontab
echo -e "\n**************${dir}****************"
cat ${dir}
echo "***********************************"
for dir in `ls -d /var/spool/cron/*`
do
echo -e "\n**************${dir}****************"
cat ${dir}
echo "***********************************"
done
dirs=("/etc/cron.d/" "/etc/cron.hourly/" "/etc/cron.daily/" "/etc/cron.weekly/" "/etc/cron.monthly/")
for dir in ${dirs[@]}
do
echo -e "\n**************${dir}****************"
ls ${dir}
echo "***********************************"
done
@toshihirock
Copy link
Author

Cron

システム設定

  • /etc/crontab

ユーザーごと

  • crontab -eで設定できる内容
  • /var/spool/cron/*
  • example:/var/spool/root

サービスごと

  • /etc/cron.d/
  • 配置されたファイルが実行される

anacron

  • /etc/cron.hourly/
  • /etc/cron.daily/
  • /etc/cron.weekly/
  • /etc/cron.monthly/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment