{"id":1095,"date":"2009-09-01T21:00:16","date_gmt":"2009-09-02T02:00:16","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=1095"},"modified":"2012-10-22T23:30:15","modified_gmt":"2012-10-23T04:30:15","slug":"setup-cygwin-cron","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=1095","title":{"rendered":"Setup Cygwin Cron"},"content":{"rendered":"<p>* Install &#8220;Admin\/cron&#8221;<br \/>\n* Install &#8220;Admin\/cygrunsrv&#8221;<br \/>\n* Install &#8220;Editors\/vim&#8221;<br \/>\n* Start Cron as a service<\/p>\n<span id=\"For_Non_Windows_2003_Servers\"><h3>For *Non* Windows 2003 Servers<\/h3><\/span>\n<pre lang=\"bash\">\r\n$ cron-config\r\nCron is already installed as a service under account NAUser-Name.\r\nDo you want to remove or reinstall it? (yes\/no) yes\r\nOK. The cron service was removed.\r\n\r\nDo you want to install the cron daemon as a service? (yes\/no) yes\r\nEnter the value of CYGWIN for the daemon: [ntsec smbntsec] ntsec\r\n\r\nThe service can run either as yourself or under a privileged account.\r\nRunning as yourself allows better access to network drives,\r\nbut does not allow to run the crontab of other users.\r\nDo you want to the cron daemon to run as yourself? (yes\/no) yes\r\n\r\nPlease enter the password for user 'User-Name':\r\nReenter:\r\n*******************************************************************\r\n* Warning: User mode mounts detected.  This will likely cause     *\r\n* the service to fail to start.  You must have system mode mounts *\r\n* in order to run services.  Re-run setup and choose 'All Users'  *\r\n* or consult the FAQ for more information.                        *\r\n*******************************************************************\r\nRunning cron_diagnose ...\r\n... no problem found.\r\n\r\nDo you want to start the cron daemon as a service now? (yes\/no) yes\r\nOK. The cron daemon is now running.\r\n\r\nIn case of problem, examine the log file for cron,\r\n\/var\/log\/cron.log, and the Windows event log (using \/usr\/bin\/cronevents)\r\nfor information about the problem cron is having.\r\n\r\nExamine also any cron.log file in the HOME directory\r\n(or the file specified in MAILTO) and cron related files in \/tmp.\r\n\r\nIf you cannot fix the problem, then report it to cygwin@cygwin.com.\r\nPlease run the script \/usr\/bin\/cronbug and ATTACH its output\r\n(the file cronbug.txt) to your e-mail.\r\n<\/pre>\n<span id=\"For_Windows_2003_Server\"><h3>For Windows 2003 Server<\/h3><\/span>\n<p>* Add a user called cron_server to run cron service<\/p>\n<pre>$ net user cron_server passwd \/add \/active:yes \/fullname:\"Cron Server\" \/comment:\"Cygwin Cron Server\"<\/pre>\n<p>* Add user cron_server to Administrators group<\/p>\n<pre>$ net localgroup Administrators cron_server \/add<\/pre>\n<p>* Modify user cron_server rights<\/p>\n<pre>$ editrights -a SeAssignPrimaryTokenPrivilege -u cron_server\r\n$ editrights -a SeCreateTokenPrivilege -u cron_server\r\n$ editrights -a SeIncreaseQuotaPrivilege -u cron_server\r\n$ editrights -a SeServiceLogonRight -u cron_server\r\n$ editrights -a SeDenyInteractiveLogonRight -u cron_server\r\n$ editrights -a SeDenyNetworkLogonRight -u cron_server\r\n$ editrights -a SeDenyRemoteInteractiveLogonRight -u cron_server<\/pre>\n<p>* Sync up Cygwin passwd file<br \/>\n$ mkpasswd -l > <\/p>\n","protected":false},"excerpt":{"rendered":"<p>* Install &#8220;Admin\/cron&#8221; * Install &#8220;Admin\/cygrunsrv&#8221; * Install &#8220;Editors\/vim&#8221; * Start Cron as a service For *Non* Windows 2003 Servers $ cron-config Cron is already installed as a service under account NAUser-Name. Do you want to remove or reinstall it? &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=1095\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[60],"tags":[],"class_list":["post-1095","post","type-post","status-publish","format-standard","hentry","category-cygwin"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-hF","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1095"}],"version-history":[{"count":26,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1095\/revisions"}],"predecessor-version":[{"id":6412,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1095\/revisions\/6412"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}