public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: How to set up crontab file in cygwin?
       [not found] <KOECLEOGILBHGEOOEBGNMEBFCAAA.jklcom@mindspring.com>
@ 2002-01-05 11:27 ` Gerrit P. Haase
  2002-01-28 16:01   ` Jeff Lu
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Gerrit P. Haase @ 2002-01-05 11:27 UTC (permalink / raw)
  To: Jeff Lu; +Cc: Cygwin

Hallo Jeff,

Please keep Cygwin related discussion on the Cygwin list.

Am 2002-01-05 um 19:16 schriebst du:

> Can you show the steps in setting up the crontab file
> and the cron job?

usage:  crontab [-u user] file
        crontab [-u user] { -e | -l | -r }
                (default operation is replace, per 1003.2)
        -e      (edit user's crontab)
        -l      (list user's crontab)
        -r      (delete user's crontab)

I use always joe because I'm too stupid to learn the VI:
$ export EDITOR=joe
you may use also `vim' as editor.
Then run:
$ crontab -e

In joe I get existing crontabs and if there are none then
an empty file, first line in my files is always:
MAILTO=gp at familiehaase.de           # <---- your.real@adress.here
and then the jobs:
0 0-23/4 * * * /usr/bin/updatedb

This means:
Run: /usr/bin/updatedb at 0:00, 4:00, 8:00, 12:00, 16:00, 20:00 o'clock,
every day of the month (say every four hours).

For details how to run a job every Monday to Friday but not Saturday and
Sunday look `man crontab' & `man 5 crontab' & `man cron'


The daemon itself is installed with cygrunsrv, see in the archives:

http://cygwin.com/ml/cygwin/2001-12/msg01242.html


Gerrit
-- 
=^..^=                                        mailto:gp@familiehaase.de


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: How to set up crontab file in cygwin?
  2002-01-05 11:27 ` How to set up crontab file in cygwin? Gerrit P. Haase
@ 2002-01-28 16:01   ` Jeff Lu
  2002-01-31 11:38     ` Jari Aalto+list.cygwin
  2002-01-28 16:15   ` Jeff Lu
  2002-01-28 16:40   ` How to start cron service " Jeff Lu
  2 siblings, 1 reply; 7+ messages in thread
From: Jeff Lu @ 2002-01-28 16:01 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: Cygwin

This is what is in my cron file

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.272 installed on Mon Jan 28 18:22:31 2002)
# (Cron version -- $Id: crontab.c,v 1.3 2001/06/07 17:12:28 corinna Exp $)
SHELL=/bin/sh
0-59/2 * * * * /c/progra~1/apache~1/apache/cgi-bin/print

I got this when try to start service
$ cygrunsrv -S cron
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
The service has not been started.

What am I doing wrong?

Thanks

-----Original Message-----
From: Gerrit P. Haase [ mailto:gp@familiehaase.de ]
Sent: Saturday, January 05, 2002 11:30 AM
To: Jeff Lu
Cc: Cygwin
Subject: Re: How to set up crontab file in cygwin?


Hallo Jeff,

Please keep Cygwin related discussion on the Cygwin list.

Am 2002-01-05 um 19:16 schriebst du:

> Can you show the steps in setting up the crontab file
> and the cron job?

usage:  crontab [-u user] file
        crontab [-u user] { -e | -l | -r }
                (default operation is replace, per 1003.2)
        -e      (edit user's crontab)
        -l      (list user's crontab)
        -r      (delete user's crontab)

I use always joe because I'm too stupid to learn the VI:
$ export EDITOR=joe
you may use also `vim' as editor.
Then run:
$ crontab -e

In joe I get existing crontabs and if there are none then
an empty file, first line in my files is always:
MAILTO=gp at familiehaase.de           # <---- your.real@adress.here
and then the jobs:
0 0-23/4 * * * /usr/bin/updatedb

This means:
Run: /usr/bin/updatedb at 0:00, 4:00, 8:00, 12:00, 16:00, 20:00 o'clock,
every day of the month (say every four hours).

For details how to run a job every Monday to Friday but not Saturday and
Sunday look `man crontab' & `man 5 crontab' & `man cron'


The daemon itself is installed with cygrunsrv, see in the archives:

http://cygwin.com/ml/cygwin/2001-12/msg01242.html


Gerrit
-- 
=^..^=                                        mailto:gp@familiehaase.de


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: How to set up crontab file in cygwin?
  2002-01-05 11:27 ` How to set up crontab file in cygwin? Gerrit P. Haase
  2002-01-28 16:01   ` Jeff Lu
@ 2002-01-28 16:15   ` Jeff Lu
  2002-01-28 16:40   ` How to start cron service " Jeff Lu
  2 siblings, 0 replies; 7+ messages in thread
From: Jeff Lu @ 2002-01-28 16:15 UTC (permalink / raw)
  To: cygwin

How can I check if my cron service is running?

-----Original Message-----
From: Gerrit P. Haase [ mailto:gp@familiehaase.de ]
Sent: Saturday, January 05, 2002 11:30 AM
To: Jeff Lu
Cc: Cygwin
Subject: Re: How to set up crontab file in cygwin?


Hallo Jeff,

Please keep Cygwin related discussion on the Cygwin list.

Am 2002-01-05 um 19:16 schriebst du:

> Can you show the steps in setting up the crontab file
> and the cron job?

usage:  crontab [-u user] file
        crontab [-u user] { -e | -l | -r }
                (default operation is replace, per 1003.2)
        -e      (edit user's crontab)
        -l      (list user's crontab)
        -r      (delete user's crontab)

I use always joe because I'm too stupid to learn the VI:
$ export EDITOR=joe
you may use also `vim' as editor.
Then run:
$ crontab -e

In joe I get existing crontabs and if there are none then
an empty file, first line in my files is always:
MAILTO=gp at familiehaase.de           # <---- your.real@adress.here
and then the jobs:
0 0-23/4 * * * /usr/bin/updatedb

This means:
Run: /usr/bin/updatedb at 0:00, 4:00, 8:00, 12:00, 16:00, 20:00 o'clock,
every day of the month (say every four hours).

For details how to run a job every Monday to Friday but not Saturday and
Sunday look `man crontab' & `man 5 crontab' & `man cron'


The daemon itself is installed with cygrunsrv, see in the archives:

http://cygwin.com/ml/cygwin/2001-12/msg01242.html


Gerrit
-- 
=^..^=                                        mailto:gp@familiehaase.de


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* How to start cron service in cygwin?
  2002-01-05 11:27 ` How to set up crontab file in cygwin? Gerrit P. Haase
  2002-01-28 16:01   ` Jeff Lu
  2002-01-28 16:15   ` Jeff Lu
@ 2002-01-28 16:40   ` Jeff Lu
  2 siblings, 0 replies; 7+ messages in thread
From: Jeff Lu @ 2002-01-28 16:40 UTC (permalink / raw)
  To: cygwin

This is my cron file

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.1800 installed on Mon Jan 28 19:02:13 2002)
# (Cron version -- $Id: crontab.c,v 1.3 2001/06/07 17:12:28 corinna Exp $)
SHELL=/bin/sh
0-59/2 * * * * /c/progra~1/apache~1/apache/cgi-bin/print

I installed and started the service but nothing is happening!

cygrunsrv -I cron -p /usr/sbin/cron -a -D
cygrunsrv -S cron

It's supposed to execute print every 30 seconds.
How do I check if the cron is really running?

Thanks

-----Original Message-----
From: Gerrit P. Haase [ mailto:gp@familiehaase.de ]
Sent: Saturday, January 05, 2002 11:30 AM
To: Jeff Lu
Cc: Cygwin
Subject: Re: How to set up crontab file in cygwin?


Hallo Jeff,

Please keep Cygwin related discussion on the Cygwin list.

Am 2002-01-05 um 19:16 schriebst du:

> Can you show the steps in setting up the crontab file
> and the cron job?

usage:  crontab [-u user] file
        crontab [-u user] { -e | -l | -r }
                (default operation is replace, per 1003.2)
        -e      (edit user's crontab)
        -l      (list user's crontab)
        -r      (delete user's crontab)

I use always joe because I'm too stupid to learn the VI:
$ export EDITOR=joe
you may use also `vim' as editor.
Then run:
$ crontab -e

In joe I get existing crontabs and if there are none then
an empty file, first line in my files is always:
MAILTO=gp at familiehaase.de           # <---- your.real@adress.here
and then the jobs:
0 0-23/4 * * * /usr/bin/updatedb

This means:
Run: /usr/bin/updatedb at 0:00, 4:00, 8:00, 12:00, 16:00, 20:00 o'clock,
every day of the month (say every four hours).

For details how to run a job every Monday to Friday but not Saturday and
Sunday look `man crontab' & `man 5 crontab' & `man cron'


The daemon itself is installed with cygrunsrv, see in the archives:

http://cygwin.com/ml/cygwin/2001-12/msg01242.html


Gerrit
-- 
=^..^=                                        mailto:gp@familiehaase.de


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: How to set up crontab file in cygwin?
  2002-01-28 16:01   ` Jeff Lu
@ 2002-01-31 11:38     ` Jari Aalto+list.cygwin
  2002-02-02 14:27       ` Gerrit P. Haase
  0 siblings, 1 reply; 7+ messages in thread
From: Jari Aalto+list.cygwin @ 2002-01-31 11:38 UTC (permalink / raw)
  To: cygwin

* Mon 2002-01-28 Jeff Lu <jklcom@mindspring.com> list.cygwin
* Message-Id: < LIEBJAJMJFLPHGCPMEBGAEAECJAA.jklcom@mindspring.com >
| This is what is in my cron file
| 
| # DO NOT EDIT THIS FILE - edit the master and reinstall.
| # (/tmp/crontab.272 installed on Mon Jan 28 18:22:31 2002)
| # (Cron version -- $Id: crontab.c,v 1.3 2001/06/07 17:12:28 corinna Exp $)
| SHELL=/bin/sh
| 0-59/2 * * * * /c/progra~1/apache~1/apache/cgi-bin/print
| 
| I got this when try to start service
| $ cygrunsrv -S cron
| cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
| The service has not been started.
| 
| What am I doing wrong?

The cron is very picky, I fought with it 4 months with very odd 
error messages until I got it right. Try this [do not change a thing!]

        cygrunsrv --stop "Cygwin cron" && cygrunsrv --remove "Cygwin cron"
        cygrunsrv -I "Cygwin cron" -p /usr/sbin/cron -a '-D' -e "CYGWIN=ntsec"
        cygrunsrv --start "Cygwin cron"

I don't use NTFS in W2k Pro, but I still put the

    CYGWIN=ntsec

Maybe someone can comment if there would be more appropriate value.

Jari


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: How to set up crontab file in cygwin?
  2002-01-31 11:38     ` Jari Aalto+list.cygwin
@ 2002-02-02 14:27       ` Gerrit P. Haase
  0 siblings, 0 replies; 7+ messages in thread
From: Gerrit P. Haase @ 2002-02-02 14:27 UTC (permalink / raw)
  To: Jari Aalto+list.cygwin, cygwin

Am 31 Jan 2002 um 21:48 hat Jari Aalto+list.cygwin geschrieben:

>* Mon 2002-01-28 Jeff Lu <jklcom@mindspring.com> list.cygwin
>* Message-Id: <LIEBJAJMJFLPHGCPMEBGAEAECJAA.jklcom@mindspring.com>
>| This is what is in my cron file
>| 
>| # DO NOT EDIT THIS FILE - edit the master and reinstall.
>| # (/tmp/crontab.272 installed on Mon Jan 28 18:22:31 2002)
>| # (Cron version -- $Id: crontab.c,v 1.3 2001/06/07 17:12:28 corinna Exp $)
>| SHELL=/bin/sh
>| 0-59/2 * * * * /c/progra~1/apache~1/apache/cgi-bin/print
>| 
>| I got this when try to start service
>| $ cygrunsrv -S cron
>| cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
>| The service has not been started.
>| 
>| What am I doing wrong?
>
>The cron is very picky, I fought with it 4 months with very odd 
>error messages until I got it right. Try this [do not change a thing!]
>
>        cygrunsrv --stop "Cygwin cron" && cygrunsrv --remove "Cygwin cron"
>        cygrunsrv -I "Cygwin cron" -p /usr/sbin/cron -a '-D' -e "CYGWIN=ntsec"
>        cygrunsrv --start "Cygwin cron"
>
>I don't use NTFS in W2k Pro, but I still put the
>
>    CYGWIN=ntsec
>
>Maybe someone can comment if there would be more appropriate value.

Have you tried CYGWIN=ntea instead of ntsec?

Gerrit-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: How to set up crontab file in cygwin?
       [not found] <KOECLEOGILBHGEOOEBGNIEBICAAA.jklcom@mindspring.com>
@ 2002-01-05 17:53 ` Gerrit P. Haase
  0 siblings, 0 replies; 7+ messages in thread
From: Gerrit P. Haase @ 2002-01-05 17:53 UTC (permalink / raw)
  To: Jeff Lu; +Cc: cygwin

Hallo Jeff,

Am 2002-01-06 um 00:26 schriebst du:

> This really helps.  Are any commands that I can use in the crontab file
> such as telling it to run a particular script on certain of the week?

> Here's what I want to do:

> I want to run pg_dump daily.  And I have 7 scripts namely
> mon, tue, wed, thu, fri, sat & sun

> I want it to execute the corresponding script for day
> For example today is Saturday, the cron with execute the script sat.

> Is there some documentation with all the commands I can use?

As I stated earlier, from $ man 5 crontab:

   5 4 * * sun     echo "run at 5 after 4 every sunday"

And please keep the conversation on <cygwin at cygwin.com> list
so other users may learn something too;)

Gerrit
-- 
=^..^=                                        mailto:gp@familiehaase.de


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2002-02-02 22:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <KOECLEOGILBHGEOOEBGNMEBFCAAA.jklcom@mindspring.com>
2002-01-05 11:27 ` How to set up crontab file in cygwin? Gerrit P. Haase
2002-01-28 16:01   ` Jeff Lu
2002-01-31 11:38     ` Jari Aalto+list.cygwin
2002-02-02 14:27       ` Gerrit P. Haase
2002-01-28 16:15   ` Jeff Lu
2002-01-28 16:40   ` How to start cron service " Jeff Lu
     [not found] <KOECLEOGILBHGEOOEBGNIEBICAAA.jklcom@mindspring.com>
2002-01-05 17:53 ` How to set up crontab file " Gerrit P. Haase

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