Cornjob Setting

martin9

New Member
Messages
7
Reaction score
0
Points
0
Hi..

I want to run a project after every 1 hour in 24 hours, every days, every weeks, every months. I have set it in this cpanel..but admin continue suspend me (coz need to gap 5 min between 2 corn)..

So I want to know what will be actual setting ? Pls help me.
 

Anna

I am just me
Staff member
Messages
11,755
Reaction score
583
Points
113
Do you have more then one cron job set? If so what are the settings for the other cron job?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
The wrong cornjob setting can cause problems with the kernel (sorry, couldn't resist).

To run a job on the hour, every hour, etc

0 * * * * job

To run a job at 1AM every day, etc

0 1 * * * job

If you put a * in the first position, the job will run once a minute and get you in trouble.

As Anna pointed out, if you have two jobs running every hour on the hour,

0 * * * * jobA
0 * * * * jobB

they overlap and get you in trouble. You have to stagger the times.


You can have three jobs

0 * * * * job1
20 * * * * job2
40 * * * * job3

They run twenty minutes apart and you have no problem

If you have only one cron job and it runs only once a week, you can still get in trouble if that one job is a resource hog.
 

Danielx386

Member
Messages
712
Reaction score
9
Points
18
will I run into trouble if I do this? I want a job that run every 90 mins

0 * * * * job1
90 * * * * job2
95 * * * * job3

Daniel
 

Anna

I am just me
Staff member
Messages
11,755
Reaction score
583
Points
113
will I run into trouble if I do this? I want a job that run every 90 mins

0 * * * * job1
90 * * * * job2
95 * * * * job3

Daniel
yes, you could do because every other time the 90 minute cron and the hourly cron would both be running on the hour.

Although I honestly have no idea if setting it to 90 is even possible, I figured it to be interperated as such as the first number (90 in your case) would be read as 90 minutes passed the hour...
 

martin9

New Member
Messages
7
Reaction score
0
Points
0
Ya account Manager I had set 2 jobs and setting was

30 * * * *
30 * * * *


Thanks Account Manager..thanks all...
I am trying that way which u have told.
 
Last edited:

dawn1980

New Member
Messages
4
Reaction score
0
Points
0
I want to run 2 job .
First would be run every one hour and
second would be run 10 min later after 1st job run .

So please tell me what would be syntax ?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Code:
0 * * * *  firstJob
10 * * * * secondJob
 

slacker3

New Member
Messages
146
Reaction score
6
Points
0
you can set up an specific cron job to run every 90 minutes using TWO commands:

Code:
 0   */3    * * *   command1
30 1-23/3   * * *   command1
 
Top