|
Home > Archive > Unix administration > January 2004 > Cronjob on the last sunday of every month
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Cronjob on the last sunday of every month
|
|
| urs_77 2004-01-23, 5:07 pm |
|
Hi,
I want to run a cronjob on the last sunday of every month. Need
some help.
Rgds,
Naveen.
--
Posted via http://mcse.ms
| |
| Desmond Coughlan 2004-01-23, 5:07 pm |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
urs_77 <member23528@mcse.ms> wrote ...
quote:
> I want to run a cronjob on the last sunday of every month. Need
> some help.
man (1) crontab
- --
Desmond Coughlan |desmond [at] zeouane [dot] org
http://www.zeouane.org/
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv
iQA/ AwUBP6Vf0WiD+5zjSqyTEQJ5+QCgzp7Zh+0LKTRC
Mezs1b0j1kFqqJQAn3xQ
9cVwwVq5PL0hEwrRu4sBCeT1
=Dmj+
-----END PGP SIGNATURE-----
| |
| Michael Vilain 2004-01-23, 5:07 pm |
| In article <287g71-st01.ln1@zeouane.org>,
Desmond Coughlan <pasdespam_desmond@zeouane.org> wrote:
quote:
> urs_77 <member23528@mcse.ms> wrote ...
>
>
> man (1) crontab
The only way I know how to do this is to put code in the script to
determine if the day is the last one in the month. Depending on what
you use to script this, it could be easy or hard. PERL has lots of
modules for date/time stuff that make this sort of thing easy. There
are all these special cases for determining the last week of each month
as it's variable, depending on the month and if it's a leap year.
Coding to run on the first Sunday of every month is much easier. Why
not do that instead?
Oh, yes. This script must go in crontab and be run every Sunday. On
non-end-of-month Sundays, it just exits.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
| |
| phn@icke-reklam.ipsec.nu 2004-01-23, 5:07 pm |
| urs_77 <member23528@mcse.ms> wrote:
quote:
> Hi,
quote:
> I want to run a cronjob on the last sunday of every month. Need
> some help.
If you don't mind running it a few minutes past midnight ( early monday
morning) it's easy
5 0 1 * 1 < command>
quote:
> Rgds,
quote:
> Naveen.
quote:
> --
> Posted via http://mcse.ms
--
Peter Håkanson
IPSec Sverige ( At Gothenburg Riverside )
Sorry about my e-mail address, but i'm trying to keep spam out,
remove "icke-reklam" if you feel for mailing me. Thanx.
| |
| urs_77 2004-01-23, 5:07 pm |
|
But crontab doesn't have an option to specify the last sunday of
every month.
Rgds,
Naveen
--
Posted via http://mcse.ms
| |
| Finnbarr P. Murphy 2004-01-23, 5:07 pm |
| Easiest way is to simply set up an entry to run every Sunday
and modify your script to test for last Sunday of the
month. For an example, see
http://www.sun.com/bigadmin/scripts...last_sunday.txt
- Finnbarr
urs_77 <member23528@mcse.ms> wrote in message news:<3551215.1067815160@mcse.ms>...quote:
> But crontab doesn't have an option to specify the last sunday of
> every month.
>
>
>
> Rgds,
>
> Naveen
|
|
|
|
|