Liunx 定时任务
一、cron服务 cron是一个linux下 的定时执行工具,可以在无需人工干预的情况下运行作业。 service crond start //启动服务 service crond stop //关闭服务 service crond restart //重启服务 service crond reload //重新载入配置 service crond status //查看服务状态 二、cron在3个地方查找配置文件:/etc/crontab全局配置文件 /etc/cron.d这个目录用来存放任何要执行的crontab文件或脚本 /etc/cron.deny该文件中所列用户不允许使用crontab命令 /etc/cron.allow该文件中所列用户允许使用crontab命令 /var/spool/cron/所有用户crontab文件存放的目录,以用户名命名,比如你是root 用户,那么当你添加任务是,就会在该路径下有一个root文件。 /etc/cron.deny该文件中所列用户不允许使用crontab命令 /var/log/croncrontab 的日志文件1、....