setting up cron job for month end week report


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers setting up cron job for month end week report
# 1  
Old 04-05-2006
Question setting up cron job for month end week report

Hi all,

Needs your help in scheduling a cron job for the below mentioned requirement. Just let me know if anybody has a similar job running as mentioned below:

Month end reports - Report of all items created in a parent table that were created during the week.

Presently this report runs every saturday as part of cron

20 03 * * 6 $HOME/job/weekly_logs.sh > $HOME/log/weekly_logs.log

Requirement:

In case month end(30 or 31) falls any day other than Friday/Saturday, we might have to run adhoc report to get models created from last run Saturday till 31st.

We need to automate this adhoc running - From the last run date(saturday) till month end(we can run <1st of next month)

Regards,
Bhups
# 2  
Old 04-05-2006
hi
i m not able to understand your requirement.
plz define it in detail
# 3  
Old 04-05-2006
cron job executing 'myJob.sh' to be ran on the LAST day of every month at 23:58 :
Code:
58 23 * * * [ `date +%d` -eq `echo \`cal\` | awk '{print $NF}'` ] && myJob.sh

# 4  
Old 04-07-2006
thanks all:-)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

cron job on 3rd sunday of every month

Hi, Actually scheduled my test scripts on test severs as shown below. They are supposed to run on 3rd sunday of every month. Unfortunately it ran on 2nd sunday of the month (suspecting that it will run every sunday). I am sorry if I miss something. Could you please let me know if I did any... (1 Reply)
Discussion started by: System Admin 77
1 Replies

2. UNIX for Dummies Questions & Answers

[Solved] Cron - job to run every 3rd Friday of the month only

Hi Expert Please help me to set a cron job schedule, Ihave a job that run every 3rd Friday of the month at 1030am. I tried to set up like this, but the job still runs every friday at 1030am. I want the job to run every 3rd Friday of the month at 1030am only 30 10 15,16,17,18,19,20,21... (2 Replies)
Discussion started by: kaibiganmi
2 Replies

3. Shell Programming and Scripting

Cron for end of month

Hello, I'm on FreeBSD 8.2-STABLE shell and I was trying the following cron entry for end of month: 59 23 * * * && /home/user/eomt.sh >/dev/null 2>&1 I get the following error Subject: Cron <user@shell> eomt.sh contains the following codes #!/bin/sh rm /home/user/tst/logs/* &&... (9 Replies)
Discussion started by: user`
9 Replies

4. Shell Programming and Scripting

cron job to run on second to last friday each month

I needed a cron job to run on the second to last friday of every month. Our servers are running HP-UX, and the HP-UX date command is pretty basic and does not have all of the fancy options that Linux date command does, and it does not have the ability at all to return future dates. So I had to... (0 Replies)
Discussion started by: lupin..the..3rd
0 Replies

5. Shell Programming and Scripting

Displaying time left to end of day, week, month?

Hello, basically I'm looking after a way of showing how many time is left to the end the day, week, month... I can't seem to figure this out, so could one of you skilled guys tell me how should this be approached? Examples: Time left: Day: 12h 12m 11s Week: 4d 12h 12m 11s Month:... (4 Replies)
Discussion started by: TehOne
4 Replies

6. UNIX for Advanced & Expert Users

Use cron to run job every other week

my colleague was asking about this: is there a way to run a cron job biweekly, like a script five.sh to run every *OTHER* Friday within November its part about every other Friday we cant find any documentation. thx L (8 Replies)
Discussion started by: lydiaflamp
8 Replies

7. Shell Programming and Scripting

End of Month - Cron Jobs

I am running AIX 5.3 with the default shell as ksh. I would like to know how to run a cron job on this system the last calendar day of the month. I found an example, but, I'm not sure if it will work with AIX and ksh... 02 16 * * * && /home/user/job-eom.kshI also need to be able to run a... (2 Replies)
Discussion started by: jthompson333
2 Replies

8. UNIX for Dummies Questions & Answers

Setting up More than One Cron Job

Hello, it is possible to setup two cron jobs to run at different frequencies? I have a cron job which runs from monday -friday every 5 mins .I also want to have one more cron job which runs on a sunday.. It it possible to have? Thanks (5 Replies)
Discussion started by: valluvan
5 Replies

9. UNIX for Dummies Questions & Answers

Cron job -- to execute at every first Sunday of every month

Dear all How can I schedule the cronjob to be run sometime at every first Sunday at every month? I have the edit the cronjob every month now, thanks (2 Replies)
Discussion started by: shanemcmahon
2 Replies

10. UNIX for Advanced & Expert Users

Unix Cron Month End Processing

Is it possible to use cron to schedule a job that will run the first 3 Sunday's during a month in addition to the last day of the month? (3 Replies)
Discussion started by: cpete
3 Replies
Login or Register to Ask a Question