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  
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/ > $HOME/log/weekly_logs.log


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)

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

# 4  
thanks all:-)

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #89
Difficulty: Easy
Software management applications like the Ubuntu Software Center are front-ends to the core terminal commands use to install and manage software applications.
True or False?

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/ >/dev/null 2>&1 I get the following error Subject: Cron <user@shell> 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 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. Shell Programming and Scripting

setting a cron job

Greetings i am a newbie to this so kindly bear with me. I have a script to get weather information from a site and save that into a database. wget Cranfield Weather Forecast temp = $(cat wx.php | grep -o "Temperature.......") rm wx.php mysql -D "weather_wise" -e "insert into weather... (6 Replies)
Discussion started by: tererez
6 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

Featured Tech Videos