This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Patch to allow Cron to use non-POSIX shells like Powershell.exe and CMD.exe
- From: "Pierre A. Humblet" <Pierre dot Humblet at ieee dot org>
- To: "Blair Sutton" <blairuk at googlemail dot com>, <cygwin at cygwin dot com>
- Date: Thu, 05 Jun 2008 17:50:01 -0400
- Subject: Re: Patch to allow Cron to use non-POSIX shells like Powershell.exe and CMD.exe
- References: <2abc9c2d0806040808s2178885ak5dcf7cd528ea685a@mail.gmail.com> <2abc9c2d0806040948l2f6dc1cbjd99bbdaea65cf181@mail.gmail.com>
----- Original Message -----
From: "Blair Sutton" <>
To: <cygwin>
Sent: Wednesday, June 04, 2008 12:48 PM
Subject: Patch to allow Cron to use non-POSIX shells like Powershell.exe and CMD.exe
| 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.
|
| 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.
|
************
Hi Blair,
I maintain cron for cygwin, thanks for your contribution.
There are other simple ways to achieve your goals,
without changing cron.
For example SHELL could be /some/path/sh2powershell
and sh2powershell be a sh script such as
#! /bin/sh
shift
exec powershell -Command "$*"
Wouldn't that work as well for you?
Pierre
--
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/