ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Ilya Palagin <tux@fioc.kz>
To: community@altlinux.ru
Subject: Re: [Comm] crontab
Date: Thu, 05 Jun 2003 11:01:36 +0700
Message-ID: <3EDEC0A0.9080409@fioc.kz> (raw)
In-Reply-To: <20030605104211.355d3ab7.Maxim.Savrilov@socenter.ru>

Maxim.Savrilov@socenter.ru wrote:
> On Thu, 5 Jun 2003 00:23:17 +0400
> Pavel Tsybulin <pavelt@alkorn.ru> wrote:
> 
> 
>>Подскажите, пожалуйста,
>>  как указать в crontab выполнять событие в 23:35 каждый
>>  _последний_ день месяца ?
> 
> 
> написать враппер, который бы проверял, а не последний ли это день
> в кронтабе даже перечислением не получится - високосные года
> 
> 35 23 28,29,30,31 * * враппер.[sh|pl|py]
> Если есть sql - это очень просто, если нет
> тоже нетрудно, прибавлять к дате один день и смотреть,
> не сменился ли месяц
Проще брать первое число следующего месяца и вычитать один день.
В перле, кстати, есть соотв. модуль для работы с датами.



      reply	other threads:[~2003-06-05  4:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-04 20:23 Pavel Tsybulin
2003-06-05  2:37 ` ASA
2003-06-05  3:35   ` BSW
2003-06-05  2:56 ` BSW
2003-06-05  3:42 ` Maxim.Savrilov
2003-06-05  4:01   ` Ilya Palagin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EDEC0A0.9080409@fioc.kz \
    --to=tux@fioc.kz \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git