public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cron and hibernate
@ 2003-10-14 19:38 Paul Y. Peng
  2003-10-14 19:56 ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Y. Peng @ 2003-10-14 19:38 UTC (permalink / raw)
  To: cygwin

I have two problems with cron:

1. Where can I get cron.README? I found several places where this file is
    referred to. But I can't find it in my installation of cygwin. Running
    setup.exe shows that I have all files in Admin and Doc installed on my
    PC. I thought this file may be important for me to use cron properly.

2. Currently I just go to /usr/sbin/ and run cron directly. It works until
    after the PC is restored from the hibernate state. Both Windows task
    manager and bash+ps show that cron is a running process. But it just
    does not respond to the job in crontab. Does anybody have experience of
    this problem to share?

I am using cron/crontab with a WinXP pro on a Laptop. I checked cygwin list,
Cygwin documents and web and couldn't find answer to these problems.

Thanks.
Paul.





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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cron and hibernate
  2003-10-14 19:38 cron and hibernate Paul Y. Peng
@ 2003-10-14 19:56 ` Corinna Vinschen
  0 siblings, 0 replies; 9+ messages in thread
From: Corinna Vinschen @ 2003-10-14 19:56 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 14, 2003 at 04:03:56PM -0230, Paul Y. Peng wrote:
> I have two problems with cron:
> 
> 1. Where can I get cron.README? I found several places where this file is
>    referred to. But I can't find it in my installation of cygwin. Running
>    setup.exe shows that I have all files in Admin and Doc installed on my
>    PC. I thought this file may be important for me to use cron properly.

/usr/share/doc/cron.README

> 2. Currently I just go to /usr/sbin/ and run cron directly. It works until
>    after the PC is restored from the hibernate state. Both Windows task
>    manager and bash+ps show that cron is a running process. But it just
>    does not respond to the job in crontab. Does anybody have experience of
>    this problem to share?

Yes, this is an internal problem of Vixie cron, not related to Cygwin.
AFAIK.  The same can happen on any system when e. g. the system clock is
too fast and it doesn't get corrected for a while.  If you then correct
the setting, cron might suddenly refuse to start any process.  Restarting
cron is the only option I know of.  I heard also about the same problem
when hibernating a laptop under Linux.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cron and hibernate
@ 2003-10-19  5:35 Paul Y. Peng
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Y. Peng @ 2003-10-19  5:35 UTC (permalink / raw)
  To: cygwin

Many thanks to all of you who replied my email. My questions have been solved.
I found cron.README. But I also learned that cron won't work properly with
hiberate (thanks to Corinna Vinschen). I tried Igor Pechtchanski's suggestion
of using run.exe and it works perfectly for me. Stephen Powell suggested
WScript. But I am not familiar with it and haven't give it a try yet.

Paul.



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cron and hibernate
  2003-10-16  7:20 ` Stephen Powell
@ 2003-10-16 13:48   ` Igor Pechtchanski
  0 siblings, 0 replies; 9+ messages in thread
From: Igor Pechtchanski @ 2003-10-16 13:48 UTC (permalink / raw)
  To: Stephen Powell; +Cc: cygwin

On Thu, 16 Oct 2003, Stephen Powell wrote:

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

How about "C:\Cygwin\usr\X11R6\bin\run.exe /c/somePath/P.sh"?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cron and hibernate
  2003-10-15 21:43 Paul Y. Peng
  2003-10-16  1:33 ` Andrew DeFaria
@ 2003-10-16  8:25 ` Corinna Vinschen
  1 sibling, 0 replies; 9+ messages in thread
From: Corinna Vinschen @ 2003-10-16  8:25 UTC (permalink / raw)
  To: cygwin

On Wed, Oct 15, 2003 at 06:48:13PM -0230, Paul Y. Peng wrote:
> Corinna Vinschen <corinna-cygwin at cygwin dot com> wrote:
> >
> >On Tue, Oct 14, 2003 at 04:03:56PM -0230, Paul Y. Peng wrote:
> >>I have two problems with cron:
> >>
> >>1. Where can I get cron.README? I found several places where this file is
> >>   referred to. But I can't find it in my installation of cygwin. Running
> >>   setup.exe shows that I have all files in Admin and Doc installed on my
> >>   PC. I thought this file may be important for me to use cron properly.
> >
> >/usr/share/doc/cron.README
> 
> Interesting. In my cygwin installation, I don't have cron.README in
> /usr/share/doc/. But I have a directory cron and a file README in cron.
> Is this the file cron.README?

No, I just got the path wrong.  Actually it is

  /usr/share/doc/Cygwin/cron.README

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cron and hibernate
  2003-10-16  2:19 Paul Y. Peng
@ 2003-10-16  7:20 ` Stephen Powell
  2003-10-16 13:48   ` Igor Pechtchanski
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Powell @ 2003-10-16  7:20 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cron and hibernate
@ 2003-10-16  2:19 Paul Y. Peng
  2003-10-16  7:20 ` Stephen Powell
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Y. Peng @ 2003-10-16  2:19 UTC (permalink / raw)
  To: cygwin

> Paul Y. Peng wrote:
> 
> 
> Thank you for this definitive but negative answer. It saves me time to try in vain. Are there any alternative ways to do the same thing as cron? I only heard about WinCron. Thanks. 
> 
> How about Windows own TaskScheduler?

I should have mentioned it in the last email.

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.

Paul.





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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cron and hibernate
  2003-10-15 21:43 Paul Y. Peng
@ 2003-10-16  1:33 ` Andrew DeFaria
  2003-10-16  8:25 ` Corinna Vinschen
  1 sibling, 0 replies; 9+ messages in thread
From: Andrew DeFaria @ 2003-10-16  1:33 UTC (permalink / raw)
  To: cygwin

Paul Y. Peng wrote:

> Thank you for this definitive but negative answer. It saves me time to 
> try in vain. Are there any alternative ways to do the same thing as 
> cron? I only heard about WinCron. Thanks. 

How about Windows own TaskScheduler?
-- 
I thought about how mothers feed their babies with tiny little spoons 
and forks so I wondered, what do Chinese mothers use? Toothpicks?



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cron and hibernate
@ 2003-10-15 21:43 Paul Y. Peng
  2003-10-16  1:33 ` Andrew DeFaria
  2003-10-16  8:25 ` Corinna Vinschen
  0 siblings, 2 replies; 9+ messages in thread
From: Paul Y. Peng @ 2003-10-15 21:43 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen <corinna-cygwin at cygwin dot com> wrote:
 >
> On Tue, Oct 14, 2003 at 04:03:56PM -0230, Paul Y. Peng wrote:
>> I have two problems with cron:
>> 
>> 1. Where can I get cron.README? I found several places where this file is
>>    referred to. But I can't find it in my installation of cygwin. Running
>>    setup.exe shows that I have all files in Admin and Doc installed on my
>>    PC. I thought this file may be important for me to use cron properly.
> 
> /usr/share/doc/cron.README

Interesting. In my cygwin installation, I don't have cron.README in
/usr/share/doc/. But I have a directory cron and a file README in cron.
Is this the file cron.README?

> 
>> 2. Currently I just go to /usr/sbin/ and run cron directly. It works until
>>    after the PC is restored from the hibernate state. Both Windows task
>>    manager and bash+ps show that cron is a running process. But it just
>>    does not respond to the job in crontab. Does anybody have experience of
>>    this problem to share?
> 
> Yes, this is an internal problem of Vixie cron, not related to Cygwin.
> AFAIK.  The same can happen on any system when e. g. the system clock is
> too fast and it doesn't get corrected for a while.  If you then correct
> the setting, cron might suddenly refuse to start any process.  Restarting
> cron is the only option I know of.  I heard also about the same problem
> when hibernating a laptop under Linux.

Thank you for this definitive but negative answer. It saves me time to try
in vain. Are there any alternative ways to do the same thing as cron? I
only heard about WinCron. Thanks.

Paul.

> 
> Corinna
> 
> -- 
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Developer                                mailto:cygwin@cygwin.com
> Red Hat, Inc.
> 
> --
> 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/
> 
> 



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-10-19  3:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-14 19:38 cron and hibernate Paul Y. Peng
2003-10-14 19:56 ` Corinna Vinschen
2003-10-15 21:43 Paul Y. Peng
2003-10-16  1:33 ` Andrew DeFaria
2003-10-16  8:25 ` Corinna Vinschen
2003-10-16  2:19 Paul Y. Peng
2003-10-16  7:20 ` Stephen Powell
2003-10-16 13:48   ` Igor Pechtchanski
2003-10-19  5:35 Paul Y. Peng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).