This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Alternative to Cron Jobs with cygrunserv


I was having a terrible time trying to get cron jobs running with
cygrunsrv on a Windows 2003 Server so I thought I would try the Windows
Scheduler Service.

First I created the bash shell script in cygwin I wanted to run (an
rsync backup) and made sure it worked on it's own.

I then created a Windows batch file that pipes the command I
want to run to the cygwin.bat file that starts cygwin.

For example:

@echo on
echo ./rsyncbkp.sh | C:\cygwin\cygwin.bat
echo exit | C:\cygwin\cygwin.bat

Save the above as a .bat file and use the Windows Scheduler to run it.

Hope this helps with those who have had trouble with cygrunsrv.

Mike



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]