This is the mail archive of the cygwin@cygwin.com 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]

Re: cron and hibernate


On Wed, 15 Oct 2003, ypeng@math.mun.ca wrote:

> I have been using Windows own TaskScheduler so far. What I don't
> like it is that it cannot run jobs silently at background,
> particularly when a job is a batch file or a bash script. Whenever
> such a job is started, an annoying DOS window pops up and it also
> occupies my taskbar.

Running a Visual Basic program under wscript doesn't open a window.

For example to run a sh script:

--Begin P.vbs--

Dim objShell, intErr

Set objShell = CreateObject("Wscript.Shell")
intErr = objShell.Run("C:\cygwin\bin\sh.exe /c/somePath/P.sh", 0, True)
Wscript.Quit(intErr)

--End P.vbs--

and schedule it as

"C:\WINDOWS\SYSTEM32\WSCRIPT.EXE //b c:\somePath\P.vbs"

under the task scheduler.

-- 
Stephen Powell
stephen_powell@optusnet.com.au


--
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]