Solved

cron every minute

Posted on 2014-10-17
8
78 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

631 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