This is the mail archive of the
mailing list for the Cygwin project.
RE: How to run a cygwin command from the window scheduler
- From: "Shaffer, Kenneth" <Kenneth dot Shaffer at sciatl dot com>
- To: <cygwin at cygwin dot com>
- Date: Sat, 29 Jul 2006 09:55:58 -0400
- Subject: RE: How to run a cygwin command from the window scheduler
- Reply-to: <cygwin at cygwin dot com>
> in a W2K3 command prompt (DOS) window
> C:\cywin\bin> (which is the command prompt prompt)
> I type the command
> c:\cygwin\bin\bash -c "/local/adminscripts/test.sh"
Type "mount" instead from your DOS prompt while in the c:\cygwin\bin
directory. If you see a mount point of "/" pointing to anywhere else
besides c:\cygwin, that could be part of your problem.
I recently had a mounting issue when upgrading from a very old cygwin,
b20 I think, and "umount -A" couldn't get rid of it, so I used regedit
to remove it.
The following is similar to what I use as a scheduled task:
Run: C:\WINNT\system32\CMD.EXE /x /c start "Some title" /min
c:\cygwin\cygwin.bat cygwin_script arg1 arg2
Start In: c:\cygwin <-- must be a real disk drive and path
Run as: domain\username
The cygwin.bat file:
rem set HOME=c:\
if "%DEF_PATH%"=="" set DEF_PATH=%PATH%
if "%myargs%" == "" goto noarg
rem echo %myargs%
bash --rcfile %HOME%/.bashrc -i -c "%myargs%"
rxvt -e /usr/bin/bash --login -i
- - - - - Appended by Scientific Atlanta, a Cisco company - - - - - This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html