Windows Task Scheduler

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows Task Scheduler

List Recv
I tried using the Windows Task Scheduler to schedule a bash -c
"hibernate now" command, yet it didn't seem to run.  Is there a reason
that bash/hibernate wouldn't like Task Scheduler?  If so, what is the
best way to handle this?  (Just install and use crond?)


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

Reply | Threaded
Open this post in threaded view
|

Re: Windows Task Scheduler

Igor Peshansky
On Wed, 4 Jan 2006, Lst Recv wrote:

> I tried using the Windows Task Scheduler to schedule a bash -c
> "hibernate now" command, yet it didn't seem to run.  Is there a reason
> that bash/hibernate wouldn't like Task Scheduler?  If so, what is the
> best way to handle this?  (Just install and use crond?)

Using cron is certainly an option.  Don't forget that using the Task
Scheduler will run your job as "SYSTEM" (a.k.a. "LocalSystem"), not the
user that scheduled the job.

However, there could be many possible reasons why your case didn't work,
many of them having to do with the properties of your Cygwin installation.
We can't know the details unless you read and follow the directions on the
Cygwin problem reporting page at <http://cygwin.com/problems.html>,
especially the request to attach the output of "cygcheck -svr" (as an
uncompressed text attachment).

FWIW, hibernate is a symlink to /bin/shutdown (which you can invoke
directly with as "shutdown -h" to hibernate, eliminating the need to use
"bash -c").
HTH,
        Igor
--
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_    [hidden email] | [hidden email]
ZZZzz /,`.-'`'    -.  ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-' old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


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

Reply | Threaded
Open this post in threaded view
|

RE: Windows Task Scheduler

Dave Korn
In reply to this post by List Recv
Lst Recv wrote:
> I tried using the Windows Task Scheduler to schedule a bash -c
> "hibernate now" command, yet it didn't seem to run.  Is there a reason
> that bash/hibernate wouldn't like Task Scheduler?  If so, what is the
> best way to handle this?  (Just install and use crond?)

Everything Igor just said, plus:

  Isn't the problem likely to be that the cygwin bin dir isn't in your
system-wide PATH setting, so task scheduler just can't _find_ bash?  

    cheers,
      DaveK
--
Can't think of a witty .sigline today....



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