Running Cygwin Scripts as Scheduled Tasks in Windows

It isn't always necessary to run Cron as a service to schedule Cygwin scripts and programs. As an alternative to using cron, you can run cygwin scripts & programs using Windows Scheduled Tasks.

From the Scheduled Tasks Window, right-click on an empty space and select 'new task'. Enter the path to Cygwin, -l, -c, and then the full command surrounded by quotes in the RUN field. e.g.

c:\cygwin\bin\bash.exe -l -c "/full/path/to/command/plus-command >> /full/path/to/a/logfile 2>&1"

Then, in the START IN field enter:

c:\cygwin\bin

Add a description and give your task a meaningful name so that when you come back to it in a year you know what it's for and you're done!


Breaking this down:

Quick and easy!

Find me on...


Support Wikipedia.
Support Wikipedia