Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date 1

Status
Not open for further replies.

smicro

MIS
Dec 26, 2002
281
US
Just wondering if anyone ever came across this. I have files that are named based on a particualer date. I was trying to find out which file names are the first Sunday of the month. I know how to run a cron job on the first Sunday of the month but this would be a little different. I'm thinking I'll need to write something that will first check which is the first Sunday of the month then compare it against the files. The file names are the dates like listed below. I can use date "+%m/%d/%Y" to get the current date in the same format as the file names. Any ideas would be great. Thanks.

08/24/2005
08/19/2005
8/1/2005
11/5/05
 
If you know how to run a cron job on the first Sunday of the month, do so and get cron to write a small file containing the date of that Sunday in the format you require and use it to compare against your files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top