crontab 任务调度
发布日期:2021-05-10 03:10:45 浏览次数:12 分类:精选文章

本文共 3043 字,大约阅读时间需要 10 分钟。

crontab ������������

crontab ��������������������������������������������������������������������������������������������������������������������������� crontab ���������������������������������������������������������������

crontab ���������������

������ crontab ������������������������������������������������������������������������������������������������������������

  • -e������������������crontab���������
  • -l������������������������crontab���������
  • -r������������������������������crontab���������
  • -e ���������������������������

���������������������������������������������crontab���������


cron ������������������

crontab ��������� five������ * * * * * ������������������������������������������������������������������������

  • *: ������"������������"���������������������������������
  • *,: ��������������������������������� 0 8,12,16 * * * ������������8:00���12:00���16:00���������������
  • ,-*: ������������������������������������1-6 ������������������������
  • */n: ������������n���������������������������

���������������������������������������������������������������������


crontab ���������������

��������� crontab ���������������������������������������

������ 1������1������������������������

* * * * * command

���������������������������������������command���������

������ 2������������������3���15������������������

3,15 * * * * command

������������3������15���������������������command���

������ 3������������21:30������smb������

30 21 * * * /etc/init.d/smb restart

������������21:30���������������smb���������

������ 4���������1������10������22������4:45������smb

45 4 1,10,22 * * /etc/init.d/smb restart

������������������1���10���22������4:45������smb���������

������ 5���������������1:10������smb������

10 1 * * 6,0 /etc/init.d/smb restart

���������������������1:10������������smb���������

������ 6���������18:00���23:00���������30������������smb

0,30 18-23 * * * /etc/init.d/smb restart

������18:00���23:00���������0������30���������smb���������

������ 7������������������������11���������smb

0 23 * * 6 /etc/init.d/smb restart

������������23:00������smb���������

������ 8������������������smb������

*/1 * * * * /etc/init.d/smb restart

������������������������������������

������ 9���������11������������7���������������������������smb

23-7/1 * * * /etc/init.d/smb restart

������������11���������7���������������������������������smb���������

������ 10���������������������������������morning 11���������smb

0 11 * * mon-wed /etc/init.d/smb restart

������ 11������������4������������������������11���������smb

0 11 4 * mon-wed /etc/init.d/smb restart

������ 12������������������������ ${HOME}/etc/cron.hourly ������������

*/1 * * * * root run-parts ${HOME}/etc/cron.hourly

������������������/etc/cron.hourly���������������������������������


������������

���������crontab���������������������������������������������

  • service crond restart���������������������������
  • crontab -r������������������������������crontab���������
  • crontab -e���������crontab���������

������������������������������������������������������������������������

上一篇:linux之 进程管理 ps 和top(重要)
下一篇:-bash: crontab: command not found已解决

发表评论

最新留言

感谢大佬
[***.8.128.20]2025年04月24日 19时06分20秒