Cron Timings


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Cron Timings
# 1  
Old 06-24-2011
Cron Timings

We have a cron job which runs at 2 different times on a daily basis

I need to change the timings now

currently its runs at 12 and 3pm

I need to make the 3pm to some 4:30PM...


Please help.
win4luv
# 2  
Old 06-24-2011
The cron line is white space separated:
Code:
MM HH DOM MO DOW Command line but watch for cron meta like '%' in date '+%Y...'

so, you want to find your line, which will be like this:
Code:
0 15 * * * your_command

and change the first two fields for 30 and 14.

Now, often both times are combines using the ',', so maybe it will be 12,15. You now need two lines, since you need two minutes and two hours. This would run 4 times: 1200, 1230, 1400, 1430
Code:
0,30 12,14 * * * your_command

Dup the line (yyp) and make one for '0 12' only and one for '30 14'.
# 3  
Old 06-24-2011
Dint understand what u meant by

Dup the line (yyp) and make one for '0 12' only and one for '30 14'.

---------- Post updated at 03:53 PM ---------- Previous update was at 03:49 PM ----------

Did u meant, i shud put 2 cron jobs running at diff times

1. 0,12 * * * your_command
2. 30,14 * * * your_cpmmand
win4luv
# 4  
Old 06-24-2011
Yes, I think that was the intention... have two jobs (there's no other way to do what you are trying - unless, of course, you can run them at 12 and 16 hours (i.e. in the same minute on the hour))
# 5  
Old 06-27-2011
Yes! I leave a little room for the student to expand, sometimes too much, but you got it, except the comma is for two times in the same column, minute of hour in your lines. You are missing a column: MOH HH DOM MM DOW Command-line. For instance, "1 2 3 4 5 xx" says "at 2:01 of April 3 when it is a Friday, run xx":

0 12 * * * Yours
# 6  
Old 06-28-2011
Thanks a lot...I got it Smilie
win4luv
# 7  
Old 06-28-2011
All 5 and it runs 4 times in 28 years, more or less. Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Some trace file to track timings of a process

I will initiate a process from Server1 and the flow is as follow Server1 --> Web server --> Application server --> DB Server Note all seperate unix servers. Now I need to put a trace for that process to track the timings from each server. Like the below trace should be there: ... (5 Replies)
Discussion started by: saraperu
5 Replies

2. UNIX for Dummies Questions & Answers

Execution problem with Cron: Script works manually but not w/Cron. Why?

Hello gurus, I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup is shown below: #!/bin/ksh db2... (3 Replies)
Discussion started by: okonita
3 Replies

3. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

4. Shell Programming and Scripting

Need Remote server Reboot timings

Hi I need to know the reboot timings of remote servers (all unix/AIX server )with the help of shell script as the list of servers is 400+. None of the commands uses system name as parameter .What to do ? I am trying man -b in variety of codes am preparing but all in vain . #!/bin/ksh... (5 Replies)
Discussion started by: vinil
5 Replies

5. SuSE

SLES 9 vs SLES 11 hard drive cache read timings are diffrent

Can anyone give me a little clue on why the hard drive cache read timings on sles 9 is better then sles 11? The same hardware was used in both test. I even deleted the ata_generic module from initrd. The speed difference is 10MB vs 5 MB Thanks (1 Reply)
Discussion started by: 3junior
1 Replies

6. Solaris

User entry in both cron.allow and cron.deny

Hello All, Anybody please help me to know ,what happens when a user having entry in both cron.allow and cron.deny files.Wheather the user will be able to access the crontab??? Thanks in advance Vaisakh (5 Replies)
Discussion started by: ksvaisakh
5 Replies

7. Shell Programming and Scripting

How To Parsed the timings from the unix Script

I want to make one scrip in unix which parsed the timing from the unix mail server for login into the mail server. say for e.g. we are searching something in google.co.in and google tells us that this much time is elapesed to fetch the data. same i want to know that how to find the timing... (2 Replies)
Discussion started by: riddhi_pbr
2 Replies

8. AIX

AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log

Hi, I can use 'crontabs –e' and do all the scheduling I like. However I would like to auto send myself just the cronjobs logs that fail. That is to say the PIDs that fail and the related lines with those PID’s only. (Not the full set of logs) Has anyone done this work? Or does an AIX 5.3 tool... (0 Replies)
Discussion started by: Keith Johnson
0 Replies

9. UNIX for Dummies Questions & Answers

calculate the time differnce between two given timings

I want to calculate the time differnce between two given timings but i don't know how . Can you help me please ? (1 Reply)
Discussion started by: Olti
1 Replies

10. UNIX for Dummies Questions & Answers

know who logged and logged out with their timings

being ordinary user (not having any administrative rights) can avail myself a facility to know who logged and logged out with their timings get popped onto my terminal as if it get echo 'ed... (3 Replies)
Discussion started by: vkandati
3 Replies
Login or Register to Ask a Question