Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

cron every minute

Posted on 2014-10-17
8
Medium Priority
?
82 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 

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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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 will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

722 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