Server for Information Technologies ������ ��������������
������� �������������� ����������
(095) 932-9212, 932-9213, 939-0783
E-mail: [email protected]
������ �������� ����(!) ������������� ���������� CIT Forum CD-ROM

CRONTAB(1)

��������
crontab - �������� ���������� ��������

���������

 crontab  [����]
 crontab  -r
 crontab  -l

��������
������� crontab � ������ �� ����������� ��������� �������� ��������� ����, ��� ����������� ����, ���� ���� �� �����, � �������, �������� ���������� �������� ���� �������������. ����� ����� ���� ������ ��������� ������� crontab �����:

-r
������� ���������� �������� �������� ������������ �� ����� ��������.
-l
������ �� ����������� ����� ���� � ����������� ���������� �������� ������������.

������������ ��������� ��������� ������� crontab ������ ��� �������, ��� ��� ��� ����������� � ����� /usr/lib/cron/cron.allow. ���� ����� ����� �� ����������, �� ����������� ���� /usr/lib/cron/cron.deny ��� ���� ����� ������, �� �������� �� ������������ ������ � crontab. ���� ��� ����� �����������, �� ������ ����������������� ��������� ����������� ���������� ��������. ���� cron.allow �� ����������, cron.deny ����������, �� �� �������� ����, �� ������������ ������� crontab ��������� ����. ����� cron.allow � cron.deny �������� �� ������ ����� � ������.

����, ����������� ���������� ��������, ������� �� �����, ������ �� ������� �������� 6 �����. ��� ���� ��������� ��������� ��� ��������� ���������. ������ 5 ����� ������������ ����� �������, ��������������� ��������� ����� �����:

   ������ (0-59),
   ���� (0-23),
   ���� ������ (1-31),
   ����� � ���� (1-12),
   ���� ������ (0-6 ��� 0=�����������).

������ �� ���� �������� ����� ���� ��� �������� *, ������� ���������� ��� ���������� ��������, ��� �������, �������� �������� ��������� ��������. ������ ������� ������ ���� ���� ������, ���� ����� �������, ������������ �������� - (����� �������� �������� ��������). �������, ��� ���� ����� ���� ������ ����� ������ (���� ������ � ���� ������). ���� � ����� ���� ����� ������� ������, �� ��������� ��������� �� ���, ������� ������ ��� ��� ���� ������, ��� ��� ���� ������. ��������, ���� ������ 5 ����� �������� 0 0 1,15 * 1, �� �������� ������������ 1 � 15 ����� ������� ������ �, ����� ����, ������ �����������. ����� ��������� ���� �����-���� ����� ��������, � ������ ���� ���������� ������� * (� �������, 0 0 * * 1 �������� � ���������� �������� ������ �� �������������).

��������� ����� ������ � ����� ���������� �������� ������������ ����� ������� ��������, ������� ����������� shell'�� � ��������� �����. ������� �������� � ���� ������� (����� �������������� \) ����������� � ������� �������� ������. ������ ������ ������������ ������ (�� ������� % ��� �� ����� ������) ����������� shell'��. ��������� ������������ ������ ����� ���� ���������� ��� ���������� �������� ��� ����������� ����.

Shell ����������� �� ��������� �������� ������������, ���������������� ��������, ��� ���� ������� �������� ����� sh. ���� ������������ �����, ����� ���������� ��� �������, �� ������ ���� ������� ��� � ����� ���������� ��������. Cron ������������ ��������������� ��������� ��� ������� shell'�, ��������� ��������� HOME, LOGNAME, SHELL (/bin/sh), � PATH (:/bin:/usr/bin:/usr/lbin).

���� ����������� ����� � ����������� �������� �� �������������, �� ���� ����� �� ���������� �������� ������������ ������������ �� �����.

�����

/usr/lib/cron
�������� ������� ������, ��������� �� ��������.
/usr/spool/cron/crontabs
������� ������ ���������� ��������.
/usr/lib/cron/log
������� ����������.
/usr/lib/cron/cron.allow
������ �������������, ������� ��������� ��������� ������� crontab.
/usr/lib/cron/cron.deny
������ �������������, ������� ��������� ��������� ������� crontab.

��. �����
sh(1).
cron(1M) � ����������� ��������������.

���������������
���� �� �������� ����� ������� crontab ��� ����������, �� �� ��������� �����, ����� CTRL+D, ��� ��� ��� ��������� ��� ���� ���������� ��������. ������ CTRL+D ����������� ������� ����������.
Comments: [email protected]
Designed by Andrey Novikov
Copyright © CIT