Cron Timings


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Cron Timings
# 8  
Old 06-28-2011
Quote:
For instance, "1 2 3 4 5 xx" says "at 2:01 of April 3 when it is a Friday, run xx":
Sorry DGPickett but this is not true and illustrates a very common mistake with creating crontabs.

Your example will run every Friday at 02:01 whatever the date.
It will also run at 02:10 on April 3 whether or not it is a Friday.

There was a classic example on this board of someone who scheduled a one-off server reboot ... or so they thought!


Quote:
All 5 and it runs 4 times in 28 years, more or less.
Oh no it doesn't. It is impossible to schedule a one-off cron more than a year in advance using basic crontabs. There are other techniques if you need them.


I think the actual answer to the original post should fire the cron at 12:00 and 16:30. The two lines are:
Code:
0 12 * * * your_command
30 16 * * * your_command


Last edited by methyl; 06-28-2011 at 07:51 PM..
# 9  
Old 06-29-2011
Sounds like a bug! In column 5 * means none if column 3 an4 not both *, and vice versa, else * means any?

Must be traditional!
 
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