Cronjob bi-Monthly Setup

Maxime Alarie malarie at processia.com
Thu Dec 2 21:51:22 UTC 2010


 

 

From: ubuntu-users-bounces at lists.ubuntu.com
[mailto:ubuntu-users-bounces at lists.ubuntu.com] On Behalf Of drew einhorn
Sent: 02 December 2010 16:30
To: Ubuntu user technical support,not for general discussions
Subject: Re: Cronjob bi-Monthly Setup

 

 

On Thu, Dec 2, 2010 at 2:14 PM, Maxime Alarie <malarie at processia.com>
wrote:

Hi,

This is  my crontab Reference:

 

#Crontab Reference

#       *     *     *   *    *        command to be executed

#       -     -     -   -    -

#       |     |     |   |    |

#       |     |     |   |    +----- day of week (0 - 6) (Sunday=0)

#       |     |     |   +------- month (1 - 12)

#       |     |     +--------- day of        month (1 - 31)

#       |     +----------- hour (0 - 23)

#       +------------- min (0 - 59)

 

 

What would be the entry of a bi-monthly entry? (every 2 weeks)   Doing
it in hours is not very elegant. Should I Gio like this?

 

0 10 1,15 * *   /etc/scripts/my_script?

 

Thanks.

 

 

bi weekly would be every two weeks, usually 26 times a year, sometime
you get 27 depending on the quirks of the calendar.  Can't do it with a
cron job.  Would have to write a script to submit the jobs individually
using at.  Would be messy.

 

the above is semi monthly you get 24 runs a year.

 

bi monthly gets you 6 a year, every two months.  Not even close to what
you want.

 

If the 1st and 15th of the month is "close enough" go with that.  If you
have to satisfy a non negotiable bureaucratic requirement after you find
out some more of the fine print you might have to write the messy
script.

 

 

 

 

	--
	ubuntu-users mailing list
	ubuntu-users at lists.ubuntu.com
	Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




-- 
Drew Einhorn

"You can see a lot by just looking." 
  --  Yogi Berra

 

 

 

Thanks.  I am not worried of having 24 or 27 runs..   The  script does a
find -mtime +15  and erase old backups J

 

Thanks to all.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20101202/f522daa5/attachment.html>


More information about the ubuntu-users mailing list