Practical Linux - Part 13 - Daemon & Cron Job | 守护进程与计划作业
- Nov 13 - Daemon & Cron Job
- linux.vbird.org/linux_basic/0560daemons.php
- linux.vbird.org/linux_basic/0430cron.php
- Daemon
- What?
- Deamon - A Process of Some Service
- Category
- Signal-control
- Interval-control
- Naming
- Service & Port
- Start & Config
/etc/init.d/*
/etc/sysconfig/*
| /etc/default/*
/etc/<service>d.conf
, /etc/<service>d.d/*
/var/lib/*
- data
/var/run/*
- pid file
- e.g.
/etc/init.d/crond start
service crond start
- (status, stop, restart)
update-rc.d
- Cron/Crontab
- What?
atd
& crond
- e.g.
atd
- linux.vbird.org/linux_basic/0430cron.php
crond
crontab [-u username] [-l|-e|-r]
- Assgnment
- Log on your Amazon vm
- Install cron
- make sure the cron deamon is running
- create a cron job that runs
touch nov13
every 5 minutes on Tuesday & Thursday - make sure it creates the file
- stop crond