Difference between revisions of "Cygwin"

From dbawiki
Jump to: navigation, search
(Diagnose problems)
(Configure cron)
Line 19: Line 19:
 
</pre>
 
</pre>
 
====Configure cron====
 
====Configure cron====
Run
+
Run this from a Cygwin terminal
 
<pre>
 
<pre>
 
cron-config
 
cron-config
 
</pre>
 
</pre>
from a Cygwin terminal
 
 
Show system log of possible problems from the cron daemon (service)
 
Show system log of possible problems from the cron daemon (service)
 
<pre>
 
<pre>
 
/usr/bin/cronevents
 
/usr/bin/cronevents
 
</pre>
 
</pre>
 +
 
===Diagnose problems===
 
===Diagnose problems===
 
Check installed modules
 
Check installed modules

Revision as of 15:55, 27 November 2014

How to run a crontab in Cygwin on Windows

  • Install cygrunsrv and cron packages from the admin bundle (with 'Install from internet" option)
  • From a Cygwin prompt, type:
cygrunsrv --install cron --path /usr/sbin/cron --args -n
  • Start the cron daemon from a Windows prompt with:
net start cron

or from a Cygwin prompt with:

cygrunsrv --start cron

or don't use cron at all!
Create a scheduled task with the windows scheduler by calling the shell program

C:\cygwin\bin\bash.exe -l -c /cygwin/path/to/shell

Configure cron

Run this from a Cygwin terminal

cron-config

Show system log of possible problems from the cron daemon (service)

/usr/bin/cronevents

Diagnose problems

Check installed modules

cygcheck.exe -c

Check current status

cygrunsrv -Q cron