Re: crontab and /usr/local/{,s}bin

2023-02-14 Thread Theo de Raadt
Todd C. Miller wrote: > The default root crontab on OpenBSD sets a more limited PATH: > > PATH=/bin:/sbin:/usr/bin:/usr/sbin > > Perhaps that is what you are talking about? We might want to > consider removing PATH from root's crontab and just use the value > from login.conf. The reason i

Re: crontab and /usr/local/{,s}bin

2023-02-14 Thread Todd C . Miller
The default root crontab on OpenBSD sets a more limited PATH: PATH=/bin:/sbin:/usr/bin:/usr/sbin Perhaps that is what you are talking about? We might want to consider removing PATH from root's crontab and just use the value from login.conf. - todd

Re: crontab and /usr/local/{,s}bin

2023-02-14 Thread Todd C . Miller
On Tue, 14 Feb 2023 23:45:29 +0100, "Thomas L." wrote: > what is the reason that /usr/local/{,s}bin is not in PATH in crontab? > this seems to be the case on all unix-like systems and it regularly > bites people. sometimes someone says it's for security w/o being > able to tell what is being preve

Re: crontab

2019-05-28 Thread Andreas Kusalananda Kähäri
On Tue, May 28, 2019 at 05:43:03PM -0400, System Administrator wrote: > On 28 May 2019 at 15:14, Carlos Aguilar wrote: > > > Hi, > > > > I am having lots of problems to execute a shell script at boot time. > > > > My crontab is as follows; > > >> > > SHELL=/bin/ksh > > > > @reboot $HOME

Re: crontab

2019-05-28 Thread System Administrator
On 28 May 2019 at 15:14, Carlos Aguilar wrote: > Hi, > > I am having lots of problems to execute a shell script at boot time. > > My crontab is as follows; > >> > SHELL=/bin/ksh > > @reboot $HOME/bin/app-ferre > << > My shell script is as follows: > >> > #!/bin/ksh > > lua=/usr/local/b

Re: crontab

2019-05-28 Thread Andreas Kusalananda Kähäri
On Tue, May 28, 2019 at 03:14:58PM -0500, Carlos Aguilar wrote: > Hi, > > I am having lots of problems to execute a shell script at boot time. > > My crontab is as follows; > >> > SHELL=/bin/ksh > > @reboot $HOME/bin/app-ferre > << > My shell script is as follows: > >> > #!/bin/ksh > >

Re: crontab

2019-05-28 Thread Edgar Pettijohn
On May 28, 2019 3:14 PM, Carlos Aguilar wrote: > > Hi, > > I am having lots of problems to execute a shell script at boot time. > > My crontab is as follows; > >> > SHELL=/bin/ksh > > @reboot $HOME/bin/app-ferre > << > My shell script is as follows: > >> > #!/bin/ksh > > lua=/usr/local/b

Re: crontab(1) confused by su(1)?

2013-07-26 Thread Jan Stary
On Jul 26 08:42:52, fluca1...@infinito.it wrote: > On Wed, Jul 24, 2013 at 8:32 AM, Jan Stary wrote: > > >> Could someone please provide an example > >> where su(1) confuses crontab(1)? > > If I get it right the problem is not running crontab, rather modifying > the crontrab files. > In such cas

Re: crontab(1) confused by su(1)?

2013-07-25 Thread Luca Ferrari
On Wed, Jul 24, 2013 at 8:32 AM, Jan Stary wrote: >> Could someone please provide an example >> where su(1) confuses crontab(1)? If I get it right the problem is not running crontab, rather modifying the crontrab files. In such case the following could be an example: I ask su(1) to become anothe

Re: crontab(1) confused by su(1)?

2013-07-23 Thread Jan Stary
On Jul 16 13:23:01, h...@stare.cz wrote: > crontab(1) says > > -u user Specifies the name of the user whose crontab(5) is to be > edited. If this option is not given, crontab examines ``your'' > crontab(5); i.e., the crontab of the person executing the >

Re: crontab mail

2011-02-01 Thread Otto Moerbeek
On Tue, Feb 01, 2011 at 10:53:26AM +0100, Leslie Jensen wrote: > If I specify > MAILTO="email@my.domain" > > in roots crontab. > > I'll recieve mail when cron runs what I've asked it to. > > With > MAILTO="root" > > Mails are delivered to the local mailbox on the system > > > In /etc/postfix

Re: crontab "last day of the month"

2010-04-08 Thread Alexander Hall
Artur Grabowski wrote: > On Tue, Apr 6, 2010 at 12:29 PM, Alexander Hall wrote: >> frantisek holop wrote: >>> hmm, on Tue, Apr 06, 2010 at 11:26:28AM +0200, Jan Stary said that On Apr 06 11:15:26, frantisek holop wrote: > hi there, > > what happens if i specify a cronjob like this

Re: crontab "last day of the month"

2010-04-08 Thread Artur Grabowski
On Tue, Apr 6, 2010 at 12:29 PM, Alexander Hall wrote: > frantisek holop wrote: >> hmm, on Tue, Apr 06, 2010 at 11:26:28AM +0200, Jan Stary said that >>> On Apr 06 11:15:26, frantisek holop wrote: hi there, what happens if i specify a cronjob like this? 23 59 31 * * $HOME/

Re: crontab "last day of the month"

2010-04-07 Thread Antti Harri
On Wed, 7 Apr 2010, Jan Stary wrote: I told I'm using visitors. Which apparently cannot do it (or what exactly is your problem?). Try webalizer, it doesn't depend on log files being particularly named and/or sorted, juts reads the individual records, remembers previous periods, what was alrea

Re: crontab "last day of the month"

2010-04-07 Thread Lars Nooden
On Tue, 6 Apr 2010, Antti Harri wrote: OK. How do I reliably get month and year out of the file? awk will work for that and for massaging archived logs. That's also the kind of task perl is best at. Another option is to reconfigure the log file format. The regular Apache format L

Re: crontab "last day of the month"

2010-04-06 Thread Jan Stary
On Apr 06 23:52:31, Antti Harri wrote: > On Tue, 6 Apr 2010, Jan Stary wrote: > >> No it's not. Unless you have some heavy traffic just around the midnight >> that is the border between months, the above newsyslog line makes >> the just-rotated access_log.0.gz contains the log of the >> month-that

Re: crontab "last day of the month"

2010-04-06 Thread Stuart Henderson
On 2010-04-06, frantisek holop wrote: > hmm, on Tue, Apr 06, 2010 at 03:01:17PM +0200, Bret S. Lambert said that >> I'm still not seeing what you're really getting, here; you're >> just pushing that spillover from one end to another, which >> are just as easily rationalized as "the casualties of l

Re: crontab "last day of the month"

2010-04-06 Thread frantisek holop
hmm, on Tue, Apr 06, 2010 at 03:01:17PM +0200, Bret S. Lambert said that > I'm still not seeing what you're really getting, here; you're > just pushing that spillover from one end to another, which > are just as easily rationalized as "the casualties of log > rotation." i get the correct name/numb

Re: crontab "last day of the month"

2010-04-06 Thread frantisek holop
hmm, on Tue, Apr 06, 2010 at 09:51:29PM +0200, Paul de Weerd said that > So you think it's my problem ? I showed two possible options, both > very workable (and easily extensible to add something simple as a > year). Yet... > > ...you choose to complain about the options I provided. i am humbled

Re: crontab "last day of the month"

2010-04-06 Thread Antti Harri
On Tue, 6 Apr 2010, Jan Stary wrote: No it's not. Unless you have some heavy traffic just around the midnight that is the border between months, the above newsyslog line makes the just-rotated access_log.0.gz contains the log of the month-that-just-ended. OK. How do I reliably get month and ye

Re: crontab "last day of the month"

2010-04-06 Thread Chris Bennett
Paul de Weerd wrote: On Tue, Apr 06, 2010 at 04:18:22PM +0200, frantisek holop wrote: | > Come on man .. 'can of worms' ?! It's not even a real challenge. | | you left off the year... So you think it's my problem ? I showed two possible options, both very workable (and easily extensible to add

Re: crontab "last day of the month"

2010-04-06 Thread Paul de Weerd
On Tue, Apr 06, 2010 at 04:18:22PM +0200, frantisek holop wrote: | > Come on man .. 'can of worms' ?! It's not even a real challenge. | | you left off the year... So you think it's my problem ? I showed two possible options, both very workable (and easily extensible to add something simple as a y

Re: crontab "last day of the month"

2010-04-06 Thread Benny Lšöfgren
frantisek holop wrote: Come on man .. 'can of worms' ?! It's not even a real challenge. you left off the year... i'd rather not bloat my 3 line scripts with lookup tables and recursive date(1) calls, i prefer them easy and short. here's the full picture of the current situation: on 1. april i

Re: crontab "last day of the month"

2010-04-06 Thread Jan Stary
On Apr 06 16:39:51, Antti Harri wrote: > Hi all, > > I want to hijack this thread a little because it sounds like > OP has similar problem to mine. > > I'm rotating logs with newsyslog and for example for web logs > I keep 12 logs available (actually it looks like count=12 keeps 13 > files availabl

Re: crontab "last day of the month"

2010-04-06 Thread Sidarta Aguiar de Oliveira
of the next day and compare with the actual month. If it's different, will execute your script ;] See ya, S idarta Oliveira - Mensagem original - De: "frantisek holop" Para: misc@openbsd.org Enviadas: TerC'a-feira, 6 de Abril de 2010 11:18:22 (GMT-0300) Auto-Dete

Re: crontab "last day of the month"

2010-04-06 Thread frantisek holop
hmm, on Tue, Apr 06, 2010 at 02:40:03PM +0200, Paul de Weerd said that > What, really ?! > > The approach with a simple lookup table: > > PREVMONTH[1]="dec"; PREVMONTH[2]="jan"; PREVMONTH[3]="feb" > PREVMONTH[4]="mar"; PREVMONTH[5]="apr"; PREVMONTH[6]="may" > PREVMONTH[7]="jun"; PREVMONTH[8]="jul

Re: crontab "last day of the month"

2010-04-06 Thread L. V. Lammert
On Tue, 6 Apr 2010, Antti Harri wrote: > Hi all, > > I want to hijack this thread a little because it sounds like > OP has similar problem to mine. > > I'm rotating logs with newsyslog and for example for web logs > I keep 12 logs available (actually it looks like count=12 keeps 13 > files availab

Re: crontab "last day of the month"

2010-04-06 Thread Antti Harri
Hi all, I want to hijack this thread a little because it sounds like OP has similar problem to mine. I'm rotating logs with newsyslog and for example for web logs I keep 12 logs available (actually it looks like count=12 keeps 13 files available but anyway that's not my problem..), rotated month

Re: crontab "last day of the month"

2010-04-06 Thread Martin Schröder
2010/4/6 frantisek holop : > my goal is to have log files that end at a certain period. syslog-ng is in ports. Best Martin

Re: crontab "last day of the month"

2010-04-06 Thread Bret S. Lambert
On Tue, Apr 06, 2010 at 02:24:27PM +0200, frantisek holop wrote: > hmm, on Tue, Apr 06, 2010 at 12:20:03PM +0200, Bret S. Lambert said that > > Not to be a dick, but what does one second buy you, really? > > it's not really about that second. > actually, i dont mind losing some 5 minutes even > fr

Re: crontab "last day of the month"

2010-04-06 Thread Paul de Weerd
On Tue, Apr 06, 2010 at 02:24:27PM +0200, frantisek holop wrote: | my goal is to have log files that end at a certain period. | | e.g. an archived log file of march that doesn't contain | april entries (from the "future"), although it's all right | if it contains a couple of stray entries from feb

Re: crontab "last day of the month"

2010-04-06 Thread Robert Bronsdon
On Tue, 06 Apr 2010 13:24:27 +0100, frantisek holop wrote: e.g. an archived log file of march that doesn't contain april entries (from the "future"), although it's all right if it contains a couple of stray entries from february (the casualties of log rotation). Then depending on what is cr

Re: crontab "last day of the month"

2010-04-06 Thread frantisek holop
hmm, on Tue, Apr 06, 2010 at 12:20:03PM +0200, Bret S. Lambert said that > Not to be a dick, but what does one second buy you, really? it's not really about that second. actually, i dont mind losing some 5 minutes even from the "current" month. my goal is to have log files that end at a certain

Re: crontab "last day of the month"

2010-04-06 Thread Jan Stary
On Apr 06 12:09:01, frantisek holop wrote: > hmm, on Tue, Apr 06, 2010 at 11:26:28AM +0200, Jan Stary said that > > On Apr 06 11:15:26, frantisek holop wrote: > > > hi there, > > > > > > what happens if i specify a cronjob like this? > > > > > > 23 59 31 * * $HOME/bin/whatever > > > > Cron will

Re: crontab "last day of the month"

2010-04-06 Thread Artur Grabowski
On Tue, Apr 6, 2010 at 12:09 PM, frantisek holop wrote: >> > i am looking for an alternative @monthly, not >> > >> > 0 0 1 * * >> > >> > but the last minutes of the last day of the month. >> >> Why? > > because for me the month ends at 23:59:59 on the last day > of month n, and not at 00:00:00 on

Re: crontab "last day of the month"

2010-04-06 Thread Otto Moerbeek
On Tue, Apr 06, 2010 at 12:09:01PM +0200, frantisek holop wrote: > hmm, on Tue, Apr 06, 2010 at 11:26:28AM +0200, Jan Stary said that > > On Apr 06 11:15:26, frantisek holop wrote: > > > hi there, > > > > > > what happens if i specify a cronjob like this? > > > > > > 23 59 31 * * $HOME/bin/whate

Re: crontab "last day of the month"

2010-04-06 Thread Paul de Weerd
On Tue, Apr 06, 2010 at 12:09:01PM +0200, frantisek holop wrote: | > Cron will just do what it's told: run whatever at "31.*. 23:59" | | so i could basically do 12 lines with the correct | last day of the month rules :] 12 ? Months come in 12 different lengths where you live ? You have bigger iss

Re: crontab "last day of the month"

2010-04-06 Thread Alexander Hall
frantisek holop wrote: > hmm, on Tue, Apr 06, 2010 at 11:26:28AM +0200, Jan Stary said that >> On Apr 06 11:15:26, frantisek holop wrote: >>> hi there, >>> >>> what happens if i specify a cronjob like this? >>> >>> 23 59 31 * * $HOME/bin/whatever >> Cron will just do what it's told: run whatever at

Re: crontab "last day of the month"

2010-04-06 Thread Bret S. Lambert
On Tue, Apr 06, 2010 at 12:09:01PM +0200, frantisek holop wrote: > hmm, on Tue, Apr 06, 2010 at 11:26:28AM +0200, Jan Stary said that > > On Apr 06 11:15:26, frantisek holop wrote: > > > hi there, > > > > > > what happens if i specify a cronjob like this? > > > > > > 23 59 31 * * $HOME/bin/whatev

Re: crontab "last day of the month"

2010-04-06 Thread frantisek holop
hmm, on Tue, Apr 06, 2010 at 11:26:28AM +0200, Jan Stary said that > On Apr 06 11:15:26, frantisek holop wrote: > > hi there, > > > > what happens if i specify a cronjob like this? > > > > 23 59 31 * * $HOME/bin/whatever > > Cron will just do what it's told: run whatever at "31.*. 23:59" so i c

Re: crontab "last day of the month"

2010-04-06 Thread Markus Hennecke
Am 06.04.2010 11:15, schrieb frantisek holop: hi there, what happens if i specify a cronjob like this? 23 59 31 * * $HOME/bin/whatever does cron handle months that dont have 31 days? i am looking for an alternative @monthly, not 0 0 1 * * but the last minutes of the last day of the month.

Re: crontab "last day of the month"

2010-04-06 Thread Jan Stary
On Apr 06 11:15:26, frantisek holop wrote: > hi there, > > what happens if i specify a cronjob like this? > > 23 59 31 * * $HOME/bin/whatever Cron will just do what it's told: run whatever at "31.*. 23:59" > does cron handle months that dont have 31 days? > i am looking for an alternative @mont