{"id":208317,"date":"2021-01-04T08:57:08","date_gmt":"2021-01-04T00:57:08","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=208317"},"modified":"2020-12-28T09:57:33","modified_gmt":"2020-12-28T01:57:33","slug":"zeit-crontab-tools","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/zeit-crontab-tools.html","title":{"rendered":"Zeit \u2013 Linux\u56fe\u5f62\u5316\u4e2d\u5b9a\u65f6\u4efb\u52a1\u7684\u5de5\u5177"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nZeit\u662f\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u7528\u4e8e\u901a\u8fc7\u201ccrontab\u201d\u548c\u201cat\u201d\u6765\u8c03\u5ea6\u4efb\u52a1\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u63a5\u53e3\u6765\u5b89\u6392\u4e00\u6b21\u6027\u7684\u4efb\u52a1\u6216\u91cd\u590d\u6027\u7684\u4efb\u52a1\u3002Zeit\u8fd8\u5e26\u6709\u4e00\u4e2a\u95f9\u949f\u548c\u8ba1\u65f6\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u58f0\u97f3\u6765\u901a\u77e5\u7528\u6237\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u7cfb\u7edf\u73af\u5883<\/strong><\/div>\n

Ubuntu 20.04<\/p>\n

\u5982\u4f55\u5b89\u88c5Zeit<\/strong><\/div>\n

\u5728Ubuntu\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u4e0b\u9762\u7684PPA\u4ed3\u5e93\u6765\u5b89\u88c5Zeit\u3002<\/p>\n

\r\nbob@ubuntu-20-04:~$ sudo add-apt-repository ppa:blaze\/main\r\n PPA for my software\r\n More info: https:\/\/launchpad.net\/~blaze\/+archive\/ubuntu\/main\r\nPress [ENTER] to continue or Ctrl-c to cancel adding it.\r\n...\r\nbob@ubuntu-20-04:~$ sudo apt install zeit\r\n<\/pre>\n

\"\"
\n\"\"
\n\u8f93\u5165Zeit<\/code>\uff0c\u5c31\u53ef\u4ee5\u8fd0\u884c
\n\"\"<\/p>\n

\u4f7f\u7528at\u547d\u4ee4\u8fd0\u884c\u4e00\u6b21\u6027\u547d\u4ee4<\/strong><\/div>\n

\u4f7f\u7528at<\/code>\u547d\u4ee4\u8fd0\u884c\u4e00\u6b21\u6027\u547d\u4ee4\uff0c\u70b9\u51fbview->Nonperiodic Commands\u6216\u8005\u6309ctrl+n<\/code>\uff0c\u90fd\u53ef\u4ee5\u5207\u6362\u5230\u975e\u5468\u671f\u6027\u4efb\u52a1\u3002
\n\"\"
\n\u9009\u62e9\u201cAdd Command\u201d\uff0c\u5e76\u6dfb\u52a0\u6761\u76ee\u3002\u5b89\u6392\u4e00\u4e2a\u547d\u4ee4\u572811:34\u8fd0\u884c\u3002\u8fd9\u4e2a\u547d\u4ee4\u5c06\u5728Downloads\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u4e00\u4e2a\u7a7a\u65e5\u5fd7\u6587\u4ef6\uff0c\u5e76\u5c06\u4eca\u5929\u7684\u65e5\u671f\u6dfb\u52a0\u5230\u6587\u4ef6\u540d\u4e2d\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

\r\nNOW=$(date +%F); touch \/home\/bob\/Downloads\/log_${NOW}.txt\r\n<\/pre>\n

\"\"
\n\"\"
\n\"\"
\n\u8fd9\u4e2a\u4efb\u52a1\u4e0d\u80fd\u4fee\u6539\uff0c\u4f46\u53ef\u4ee5\u5220\u6389\u91cd\u65b0\u6dfb\u52a0\u3002
\n11:34\u5206\u53ef\u4ee5\u770b\u5230\uff0cDownloads\u76ee\u5f55\u4e0b\u9762\u5df2\u7ecf\u521b\u5efa\u4e86\u65e5\u5fd7\u6587\u4ef6\u3002
\n\"\"
\nZeit\u754c\u9762\uff0c\u6309ctrl+r<\/code>\uff0c\u5237\u65b0\u4e00\u4e0b\u9875\u9762\uff0c\u53d1\u73b0\u4efb\u52a1\u5df2\u7ecf\u6267\u884c\u5b8c\u6210\uff0c\u6d88\u5931\u4e86\u3002
\n\"\"<\/p>\n

\u521b\u5efa\u5468\u671f\u6027\u4efb\u52a1<\/strong><\/div>\n

\u8981\u60f3\u4f7f\u7528crond<\/code>\u8fdb\u7a0b\u8c03\u5ea6\u4efb\u52a1\uff0c\u70b9\u51fbView->Periodic Tasks\u6216\u6309\u4e0bCTRL + P<\/code>\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cZeit\u542f\u52a8\u201cPeriodic Tasks\u201d\u3002
\n\"\"
\n\u8f93\u5165\u63cf\u8ff0\u3001\u547d\u4ee4\u548c\u8ba1\u5212\u65f6\u95f4\uff0c\u70b9\u51fbok\u5c06\u6761\u76ee\u6dfb\u52a0\u5230crontab\u3002\u4e0b\u9762\u662f\u6bcf\u5929\u76840\u70b90\u5206\u5907\u4efd\u65e5\u5fd7\u76ee\u5f55\u5230\u7528\u6237\u5bb6\u76ee\u5f55\u3002
\n\"\"
\n\"\"
\n\u53ef\u4ee5\u4f7f\u7528crontab -l<\/code>\u68c0\u67e5\u5df2\u6dfb\u52a0\u7684\u6761\u76ee\uff1a<\/p>\n

\r\nbob@ubuntu-20-04:~$ crontab -l\r\n<\/pre>\n

\"\"<\/p>\n

\u603b\u7ed3<\/strong><\/div>\n

Zeit\u662f\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u7528\u4e8e\u901a\u8fc7\u201ccrontab\u201d\u548c\u201cat\u201d\u6765\u8c03\u5ea6\u4efb\u52a1\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u63a5\u53e3\u6765\u5b89\u6392\u4e00\u6b21\u6027\u7684\u4efb\u52a1\u6216\u91cd\u590d\u6027\u7684\u4efb\u52a1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Ubuntu 20.04 \u5728Ubuntu\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u4e0b\u9762\u7684PPA\u4ed3\u5e93\u6765\u5b89\u88c5Zeit\u3002 bob@ubun […]<\/p>\n","protected":false},"author":309,"featured_media":208318,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-208317","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/208317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=208317"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/208317\/revisions"}],"predecessor-version":[{"id":208332,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/208317\/revisions\/208332"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/208318"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=208317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=208317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=208317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}