Or, since last day of the month never occurs before the 28th, you
could run the script only on days which might be the last of the
month,
Also, since crontab does support a month column, you could have three
crontab entries: one for months with 31 days (month: 1,3,5,7,8,10,12),
another for months
Hi,
Adam Paulukanis wrote on Wed, Sep 01, 2021 at 04:39:54PM +0200:
> if today is the last day of the month, tomorrow will be 1st.
That is a non-portable assumption and a trap that many people seem
to fall into.
For example, in the shire calendar, 1 Afterlithe (~= July) is the
fourth day after
On Wed, Sep 01, 2021 at 04:39:54PM +0200, Adam Paulukanis wrote:
| On Wed, 1 Sept 2021 at 16:32, Christian Weisgerber wrote:
| >
| > Goetz Schultz:
| >
| > > I would go the other way and check tomorrows date. If it is "01", then I
| > > know today is the last of this month:
| > >
| > > date --date
On Wed, 1 Sept 2021 at 16:39, Adam Paulukanis wrote:
>
> On Wed, 1 Sept 2021 at 16:32, Christian Weisgerber wrote:
> >
> > Goetz Schultz:
> >
> > > I would go the other way and check tomorrows date. If it is "01", then I
> > > know today is the last of this month:
> > >
> > > date --date="tomorro
On Wed, 1 Sept 2021 at 16:32, Christian Weisgerber wrote:
>
> Goetz Schultz:
>
> > I would go the other way and check tomorrows date. If it is "01", then I
> > know today is the last of this month:
> >
> > date --date="tomorrow" +%d
> > 02
>
> That's not OpenBSD.
>
> $ date --date="tomorrow" +%d
>
Goetz Schultz:
> I would go the other way and check tomorrows date. If it is "01", then I
> know today is the last of this month:
>
> date --date="tomorrow" +%d
> 02
That's not OpenBSD.
$ date --date="tomorrow" +%d
date: unknown option -- -
usage: date [-aju] [-f pformat] [-r seconds]
[
Hello
I do this one liner in my cron with success, maybe it suits you:
0› 5› *› *› *› TOM=$(TZ=MST-24 date +%d); [ $TOM
-eq 1 ] && logger "Ultimo dia do mês!!!"
Em qua., 1 de set. de 2021 às 09:06, Nick Holland <
n...@holland-consulting.net> escreveu:
> On 9/1/21 5:50 A
On 01/09/2021 13:02, Nick Holland wrote:
On 9/1/21 5:50 AM, Joel Carnat wrote:
Hello,
I would like to run a command on "the last day of each month".
From what I understood reading the crontab(5) manpage, the simplest way
would be setting day-of-month to "28-31". But this would mean running
On 9/1/21 5:50 AM, Joel Carnat wrote:
Hello,
I would like to run a command on "the last day of each month".
From what I understood reading the crontab(5) manpage, the simplest way
would be setting day-of-month to "28-31". But this would mean running
the command 4 times for months that have 31
Joel Carnat wrote:
> Hello,
>
> I would like to run a command on "the last day of each month".
>
> From what I understood reading the crontab(5) manpage, the simplest
> way would be setting day-of-month to "28-31". But this would mean
> running the command 4 times for months that have 31 days.
Hello,
I would like to run a command on "the last day of each month".
From what I understood reading the crontab(5) manpage, the simplest way
would be setting day-of-month to "28-31". But this would mean running
the command 4 times for months that have 31 days.
Is there a simpler/better way
11 matches
Mail list logo