{"id":8266,"date":"2014-08-08T20:28:48","date_gmt":"2014-08-08T20:28:48","guid":{"rendered":"http:\/\/tajdini.net\/blog\/2014\/08\/08\/cron-linux\/"},"modified":"2014-08-08T20:28:48","modified_gmt":"2014-08-08T20:28:48","slug":"cron-linux","status":"publish","type":"post","link":"https:\/\/tajdini.net\/blog\/linux-and-open-source\/cron-linux\/","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 Cron \u0644\u06cc\u0646\u0648\u06a9\u0633"},"content":{"rendered":"<p dir=\"RTL\">\u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647<span dir=\"LTR\">Cron <\/span>\u062f\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 \u0627\u0633\u062a \u0627\u0645\u0627<span dir=\"LTR\">Cron <\/span>\u0686\u06cc\u0633\u062a \u061f<\/p>\n<p dir=\"RTL\"><span dir=\"LTR\">cron <\/span>\u06cc\u06a9 \u0633\u0631\u0648\u06cc\u0633 \u0648 \u06cc\u06a9 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0634\u0645\u0627 \u0627\u06cc\u0646 \u0627\u0645\u06a9\u0627\u0646 \u0631\u0627 \u0645\u06cc\u062f\u0647\u062f \u06a9\u0647 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0648 \u06cc\u0627 \u0628\u0647 \u0637\u0648\u0631 \u06a9\u0644\u06cc \u0639\u0645\u0644\u06cc\u0627\u062a\u06cc \u0631\u0627 \u062f\u0631 \u0632\u0645\u0627\u0646 \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u062f\u0648\u0631\u0647 \u0627\u06cc \u0648 \u0645\u062a\u0646\u0627\u0648\u0628 \u0627\u062c\u0631\u0627 \u0646\u0645\u0627\u06cc\u06cc\u062f . \u0633\u0631\u0648\u06cc\u0633<span dir=\"LTR\">cron <\/span>\u0645\u0639\u0645\u0648\u0644\u0627 \u0628\u0647 \u0637\u0648\u0631 \u067e\u06cc\u0634 \u0641\u0631\u0636 \u0628\u0631 \u0631\u0648\u06cc \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u0647\u0627\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633 \u0646\u0635\u0628 \u0645\u06cc\u0634\u0648\u062f \u0648 \u062a\u0646\u0647\u0627 \u06a9\u0627\u0641\u06cc\u0633\u062a \u06a9\u0647 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u06a9\u0627\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f<span dir=\"LTR\">.<\/span><\/p>\n<p dir=\"RTL\">\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0628\u0627 \u0646\u062d\u0648\u0647 \u06a9\u0627\u0631<span dir=\"LTR\">Cron <\/span>\u0622\u0634\u0646\u0627 \u0628\u0634\u06cc\u062f \u0628\u0647 \u0627\u062f\u0627\u0645\u0647 \u0645\u0637\u0644\u0628 \u0645\u0631\u0627\u062c\u0639\u0647 \u06a9\u0646\u06cc\u062f<span dir=\"LTR\">.<\/span><\/p>\n<p>\u00a0<\/p>\n<p dir=\"RTL\">\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0628\u0647<span dir=\"LTR\">Cron <\/span>\u062f\u0633\u062a\u0631\u0633\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u0628\u0627\u06cc\u062f \u0628\u062a\u0648\u0627\u0646\u06cc\u062f \u0622\u0646 \u0631\u0627 \u0648\u06cc\u0631\u0627\u0634 \u06a9\u0646\u06cc\u062f \u0627\u0645\u0627 \u0628\u0631\u0627\u06cc \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0622\u0646 \u0628\u0627\u06cc\u062f \u0645\u062d\u0644 \u0622\u0646 \u0631\u0627 \u0628\u062f\u0627\u0646\u06cc\u062f \u06a9\u062c\u0627 \u0627\u0633\u062a \u0648<span dir=\"LTR\">cron <\/span>\u0627\u0632 \u06f2\u062c\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0648\u06cc\u0631\u0627\u06cc\u0634 \u062f\u0627\u0631\u062f<span dir=\"LTR\">.<\/span><\/p>\n<p dir=\"RTL\">\u06f2\u062a\u0627 \u062f\u0633\u062a\u0648\u0631 \u062f\u0627\u0631\u06cc\u0645 \u062f\u0633\u062a\u0648\u0631 \u0627\u0648\u0644 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a<span dir=\"LTR\">.<\/span><\/p>\n<p style=\"text-align: left;\"># <strong>crontab -l<\/strong> [<em>username<\/em>]<\/p>\n<p dir=\"RTL\">\u0648 \u062f\u0633\u062a\u0648\u0631 \u0628\u0639\u062f\u06cc \u0627\u06cc\u0646 \u0627\u0633\u062a<span dir=\"LTR\">:<\/span><\/p>\n<p style=\"text-align: left;\">nano \/etc\/crontab<\/p>\n<p dir=\"RTL\">\u0627\u0645\u0627 \u0686\u0631\u0627 \u06f2\u062a\u0627 \u062f\u0633\u062a\u0648\u0631 \u061f\u061f \u0686\u0648\u0646 \u0628\u0627\u06cc\u062f \u062f\u0631 \u0647\u0631 \u06f2\u062a\u0627 \u062f\u0633\u062a\u0648\u0631<span dir=\"LTR\">Cron <\/span>\u0632\u062f\u0647 \u0634\u0648\u062f<span dir=\"LTR\">.<\/span><\/p>\n<p dir=\"RTL\">\u0646\u062d\u0648\u0647 \u0646\u0648\u0634\u062a\u0646<span dir=\"LTR\">Cron <\/span>\u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a \u0648 \u062d\u0627\u0644\u062a \u06a9\u0644\u06cc \u0627\u06cc\u0646 \u0637\u0648\u0631\u06cc \u0627\u0633\u062a<span dir=\"LTR\">.<\/span><\/p>\n<p style=\"text-align: left;\">\u00a0* * * * * command to be executed<\/p>\n<p style=\"text-align: left;\">&#8211; &#8211; &#8211; &#8211; &#8211;<\/p>\n<p style=\"text-align: left;\">| | | | |<\/p>\n<p style=\"text-align: left;\">| | | | &#8212;&#8211; Day of week (0 &#8211; 7) (Sunday=0 or 7)<\/p>\n<p style=\"text-align: left;\">| | | &#8212;&#8212;- Month (1 &#8211; 12)<\/p>\n<p style=\"text-align: left;\">| | &#8212;&#8212;&#8212; Day of month (1 &#8211; 31)<\/p>\n<p style=\"text-align: left;\">| &#8212;&#8212;&#8212;&#8211; Hour (0 &#8211; 23)<\/p>\n<p style=\"text-align: left;\">&#8212;&#8212;&#8212;&#8212;- Minute (0 &#8211; 59)<\/p>\n<p dir=\"RTL\" style=\"text-align: left;\">\u00a0\u0627\u0645\u0627 \u0645\u062b\u0627\u0644 \u0628\u0627\u0644\u0627 \u06cc\u0639\u0646\u06cc \u0686\u06cc \u061f\u061f<\/p>\n<p dir=\"RTL\">\u0633\u062a\u0627\u0631\u0647 \u0627\u0648\u0644 = \u0647\u0645\u06cc\u0634\u0647 \u0628\u0631\u0627\u06cc \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642\u0647 \u060c<br \/> \u0633\u062a\u0627\u0631\u0647 \u062f\u0648\u0645 = \u0628\u0631\u0627\u06cc \u062a\u0646\u0638\u06cc\u0645 \u0633\u0627\u0639\u062a \u060c<br \/> \u0633\u062a\u0627\u0631\u0647 \u0633\u0648\u0645 = \u062f\u0631 \u06cc\u06a9\u06cc \u0627\u0632 \u0631\u0648\u0632\u0647\u0627\u06cc \u0645\u0627\u0647 \u060c<br \/> \u0633\u062a\u0627\u0631\u0647 \u0686\u0647\u0627\u0631\u0645 = \u062f\u0631 \u06cc\u06a9\u06cc \u0627\u0632 \u0645\u0627\u0647 \u0647\u0627\u06cc \u0633\u0627\u0644 \u060c<br \/> \u0633\u062a\u0627\u0631\u0647 \u067e\u0646\u062c\u0645 = \u062f\u0631 \u06cc\u06a9\u06cc \u0627\u0632 \u0631\u0648\u0632\u0647\u0627\u06cc \u0647\u0641\u062a\u0647 \u060c<\/p>\n<p dir=\"RTL\"><strong>\u0647\u0631 \u0639\u062f\u062f\u06cc \u0628\u0632\u0627\u0631\u06cc\u062f \u0633\u0631 \u0647\u0645\u0648\u0646 \u0632\u0645\u0627\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f . \u06cc\u0639\u0646\u06cc \u0628\u0647 \u062c\u0627\u06cc \u0633\u062a\u0627\u0631\u0647 \u0627\u0648\u0644 <\/strong><strong>\u06f2\u06f0<\/strong><strong>\u0628\u0632\u0627\u0631\u06cc\u062f \u0647\u0631 \u0633\u0627\u0639\u062a \u0633\u0631 \u062f\u0642\u06cc\u0642\u0647 <\/strong><strong>\u06f2\u06f0<\/strong><strong>\u06cc\u06a9 \u06a9\u0627\u0631\u06cc \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f \u0648 \u0627\u06af\u0631 \u0628\u0647 \u062c\u0627\u06cc \u0633\u062a\u0627\u0631\u0647 \u062f\u0648\u0645 <\/strong><strong>\u06f2<\/strong><strong>\u0628\u0632\u0627\u0631\u06cc\u062f \u06cc\u0639\u0646\u06cc \u0633\u0627\u0639\u062a <\/strong><strong>\u06f2<\/strong><strong>\u0647\u0631 \u0631\u0648\u0632 \u0633\u062a\u0627\u0631\u0647 \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u062a\u06a9\u0631\u0627\u0631 \u0645\u06cc \u0628\u0627\u0634\u062f<\/strong><strong><span dir=\"LTR\">.<\/span><\/strong><\/p>\n<p dir=\"RTL\"><strong>\u0646\u06a9\u062a\u0647 : \u0627\u06af\u0631 \u0628\u0647 \u0635\u0648\u0631\u062a <\/strong><strong>\u06f2\u06f0\/* <\/strong><strong>\u062f\u0631 \u062f\u0642\u06cc\u0642\u0647 \u06cc\u0639\u0646\u06cc \u0647\u0631 <\/strong><strong>\u06f2\u06f0<\/strong><strong>\u062f\u0642\u06cc\u0642\u0647 \u062f\u0631 \u0633\u0627\u0639\u062a \u06cc\u0639\u0646\u06cc \u0647\u0631 \u0686\u0646\u062f \u0633\u0627\u0639\u062a \u06a9\u0647 \u0645\u06cc\u062e\u0648\u0627\u0647\u06cc\u062f \u0627\u0646\u062c\u0627\u0645 \u0634\u0648\u062f \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u062d\u0644\u0642\u0647 \u062a\u06a9\u0631\u0627\u0631 \u0645\u06cc \u0634\u0648\u062f<\/strong><strong><span dir=\"LTR\">.<\/span><\/strong><\/p>\n<p dir=\"RTL\">\u0686\u0646\u062f \u062a\u0627 \u0645\u062b\u0627\u0644 \u0627\u0632<span dir=\"LTR\">Cron <\/span>\u0628\u0632\u0646\u06cc\u0645<span dir=\"LTR\">:<\/span><\/p>\n<p style=\"text-align: left;\"><span dir=\"RTL\">\u06f0<\/span><span dir=\"RTL\">\u06f3<\/span>* * * \/root\/backup.sh &gt;\/dev\/null 2&gt;&amp;1<\/p>\n<p style=\"text-align: left;\">*\/20 * * * * \u00a0Command<\/p>\n<p style=\"text-align: left;\"># 32 * * * * : will be run every hour on the 32nd minute.<\/p>\n<p style=\"text-align: left;\"># 12,42 * * * * : will be run twice an hour on the 12th and 42nd<\/p>\n<p style=\"text-align: left;\">minutes.<\/p>\n<p style=\"text-align: left;\"># *\/15 *\/2 * * *: will be run at 0:00, 0:15, 0:30, 0:45, 2:00, &#8230;<\/p>\n<p style=\"text-align: left;\"># 43 18 * * 7: will be run at 6:43pm every Sunday.<\/p>\n<p style=\"text-align: left;\">\u00a0<\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647Cron \u062f\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 \u0627\u0633\u062a \u0627\u0645\u0627Cron \u0686\u06cc\u0633\u062a \u061f cron \u06cc\u06a9 \u0633\u0631\u0648\u06cc\u0633 \u0648 \u06cc\u06a9 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0634\u0645\u0627 \u0627\u06cc\u0646 \u0627\u0645\u06a9\u0627\u0646 \u0631\u0627 \u0645\u06cc\u062f\u0647\u062f \u06a9\u0647 \u062f\u0633\u062a\u0648\u0631\u0627\u062a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[227,234],"tags":[242,5,4,264,276],"class_list":["post-8266","post","type-post","status-publish","format-standard","hentry","category-linux-and-open-source","category-training-and-reference","tag-cron","tag-linux","tag-persian","tag-training"],"_links":{"self":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts\/8266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/comments?post=8266"}],"version-history":[{"count":0,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts\/8266\/revisions"}],"wp:attachment":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/media?parent=8266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/categories?post=8266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/tags?post=8266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}