Solved

cron every minute

Posted on 2014-10-17
8
68 Views
Last Modified: 2014-10-24
hi expets

i want to schedule a cron job every minute Mon to Fri

i want to schedule a cron job every minute 7 days of the week.

Any idea what the cron syntax expression should be ?

thanks.
0
Comment
Question by:royjayd
  • 5
  • 3
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 40387360
afaicr - not possible (>= 5 mins)
0
 

Author Comment

by:royjayd
ID: 40387388
sorry, what is afaicr ?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 40387400
As Far As I Can Remember (see why i wrote it now? ;))

The usual response to the question is something along the lines of 'use a looping shell script instead' but of course, you're in the Java TA so ...
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:royjayd
ID: 40387425
ok. Can you tell me what is cron date/ time expression if i have to run every 5 minutes 7 days a week.

for every 5 hours monday to friday i have
0 0/5 * * * MON-FRI

what would it be for every 5 minutes 7 days a week?

thanks.
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 40387464
*/5 * * * * /usr/bin/foo

Open in new window

i think - better check ;)
0
 

Author Comment

by:royjayd
ID: 40387506
thanks
so if */5 * * * * /usr/bin/foo schedules every 5 minutes,
*/1 * * * * /usr/bin/foo should schedule every one minute, right ?
I thought only seconds level scheduling is not possible with cron, correct me if i am wrong.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 40387604
Sorry - i must have been remembering some other limit. Doh!

Yes, that will work or just

* * * * * /usr/bin/foo 

Open in new window

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 40401718
:)
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
topping3 challenge 14 79
Where to store the queries for modification of table 4 61
expectj telnet failing 5 35
SHA2 certs for IIS AND Java? 2 80
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question