I have script which need to run using cygwin crontab.
So what i have done.
installed two additional cygwin packages using cygwin setup.exe
Cron and cygrunsrv
Then in installed the new crontab
* * * * * sh /housekeeper.sh -t CPS
since i could not get the output of the housekeeper.sh, i checked the status of
cronevents.exe
This gives me following error message.
2012/05/28 18:22:01 [SYSTEM] /usr/sbin/cron: PID 3880: (CRON) error (can't switc
h user context)
could anybody help me with this issue.
Thanks in advance for anyhelp
This error appears in the Windows Application Event Log and occurs because the account running the service can't switch user context (see http://www.davidjnice.com/cygwin_cron_service.html)
Change the user who runs the service to the real user who has to run the script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With