Blair Sutton <blairuk <at> googlemail.com> writes: > > I simply introduce a new environment variable called SHELLSWICTH that > defaults to "-c" if not used. Otherwise, one can set it to "/c" or > "-Command" for Windows shells.
Why should we patch a cygwin utility to promote the use of a non-cygwin shell? > Attachment (cron-bs.patch): application/octet-stream, 718 bytes > Attachment (cron.tab): application/octet-stream, 709 bytes Sending text files as application/octet-stream makes them harder to read in email. Consider using a text MIME type instead. > > Hi > > This is a very simple patch for Cron to allow one to use a shell like > powershell or cmd. I've done some testing and it appears to work well. You should fix your mailer to not send duplicate copies of a message when writing to a text-only mailing list. > > SHELL=/cygdrive/c/WINDOWS/system32/windowspowershell/v1.0/powershell.exe > SHELLSWITCH=-Command > > * * * * * echo test 1 2 3 > * * * * * ls c: > * * * * * & 'C:\Documents and Settings\blair sutton\My > Documents\WindowsPowerShell\Test\test.ps1' one two three And what's wrong with doing this with what cron already provides: * * * * * /cygdrive/c/windows/system32/windowspowershell/v1.0/powershell - Command '"c:\documents and settings\blair sutton\my documents\windowspowershell\test\test.ps1" one two three' > > Hope you might be able to use it. I'm not the cron maintainer, but I hope he doesn't bloat the code for this. -- Eric Blake -- 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/