LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-08-2008, 12:09 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,129

Rep: Reputation: 30
Monthly job


In our system , there are some batch job will only be run at the last day of each month , but the last day is different ( eg. 31th for Jan , 28th or 29th for Feb , 31th for Mar ) depends on the month, could advsie how can I check if it is the last day of the month ? can advise how to write the script ?
 
Old 12-08-2008, 12:43 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Searching is easy

http://www.linuxquestions.org/questi...-month-662702/
 
Old 12-08-2008, 07:24 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
Why? See my post there.
 
Old 12-08-2008, 09:36 AM   #4
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Rep: Reputation: 25
First you ll hav to define wat is d end day for each month. (not for all months. there are only 4 types of end dates).
if you treat months as 1,2...,12 then set the end date also by considering the year (if it is a leap year or not).
this is only one way.

I think writing a script for that is not tedious. If you hav to run a particular application on the end date, use scheduling package like crontab.

thanx
 
Old 12-09-2008, 07:59 AM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
Define "at the last day of each month" -- specifically when on the last day of the month, specifically before or after the end of the business day.

What is your batch job going to do?

I suspect that for most purposes, just after midnight (i.e. early on the 1st of the next month) is as good as just before midnight.

Please answer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cronjob - Monthly on Saturday joerilinux Linux - Newbie 4 09-18-2009 03:08 AM
MailScanner Monthly Report waelaltaqi Linux - Server 4 11-16-2007 09:24 AM
scheduling monthly job in cron from debian sarge 3.1 sridhar11 Debian 2 10-28-2005 09:03 AM
Pseudo-Monthly Harware Poll: What would U use? finegan Linux - Hardware 22 10-14-2004 06:14 PM


All times are GMT -5. The time now is 07:07 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration