Please help

Status
Not open for further replies.

admin500

New Member
Messages
46
Reaction score
0
Points
0
Guys you keep suspending my account caz my crons are wrong can u please tell me which is wrong and how to fix it.
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
You are only allowed to run 1 cron every 5 minutes. If you have 2 crons, you can't run them at the same time.

Do you agree to change your crons?
 

admin500

New Member
Messages
46
Reaction score
0
Points
0
I don't run them at the same time. One runs every 5 mins one runs every hour one runs evrey midnight one runs every sunday. Can you tell how i can make it like that.
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
well, say the one runs every midnight on a sunday, then all crons would run at the same time, as it's sunday (00:00), it's midnight(00:00), it's one hour(00:00) (one hour crons usually run on every new hour) and it's 5 minutes(00:00) (5 min crons run every 05, 10, 15 ...... 55, 00).

Then when the one hour cron is run, the 5 min cron will also run. So you have to somehow cut down the amount of crons, or somehow make it that they never collide, if that is possible
 

admin500

New Member
Messages
46
Reaction score
0
Points
0
If you can suspend my account also tell me how I can fix it. Tell me away that all of these crons run but never collide. If you can't help me then it is not possible and I can't cut down any crons because they are all important.
Edit:
If you say so and tell me how I could do this that add the details of 5 min cron in hour so at 00 only hour runs not 5 min
 
Last edited:

adamparkzer

On Extended Leave
Messages
3,745
Reaction score
81
Points
0
If you can suspend my account also tell me how I can fix it. Tell me away that all of these crons run but never collide. If you can't help me then it is not possible and I can't cut down any crons because they are all important.
Edit:
If you say so and tell me how I could do this that add the details of 5 min cron in hour so at 00 only hour runs not 5 min

Hi admin500,

You have been unsuspended. Please try using your idea mentioned above to try to fix the problem. You have four yours from the time of your unsuspension to resolve the problem.

- Adam
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Start with the one that runs the fewest times and then add the next so it does not conflict.


1. Every Sunday, 12:20 AM

20 0 * * 0 SundayJob

Do not set it to run at midnight or on the hour, or it will conflict with the next two

2. Every midnight (12:10AM)

10 0 * * * MidnightJob

3. Every hour

0 * * * * HourJob

Now you have no conflicts, they are 5 minutes apart around midnight.

4. Every five minutes -- the tricky part

5,15,25,30,35,40,45,50,55 * * * * 5minuteJob

No conflict with the others, but you do have "holes" at 0, 10, and 20.

a. There is nothing you can do about the 'hole' at 0, nothing. If you must, adjust your hourly job to include the 5-minute job. But make sure that it does not bloat the hourly job to the point that it in itself causes a high resource suspension.

b. The 'hole' at 10. Create a fourth cron job to fill in some of the holes.

10 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * * 5MinuteJob

runs at 10 after the hour, every hour except Midnight.

c. The 'hole' at 20. You need to create a couple more cron jobs to fill this hole. I leave it to you to figure it out.
 

admin500

New Member
Messages
46
Reaction score
0
Points
0
I have dont this to 5 min cron 5,10,15,20,25,30,35,40,45,50,55 * * * * and to day cron 8 0 * * 0
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
I have dont this to 5 min cron 5,10,15,20,25,30,35,40,45,50,55 * * * * and to day cron 8 0 * * 0

If I understand what you are saying,,,,,

12:05 AM Sunday, first cron runs.
12:08 AM Sunday, second cron runs....VIOLATION...2 crons 3 min apart
12:10 AM Sunday, first cron runs...VIOLATION... 2 crons 2 min apart
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Well, only way to fix this is having the 5 min cron to not run every 5 min.

Have the sunday cron run at 00:05, the midnight cron at 00:00, and the 5 min cron every 10, 15, 20, 25, 30, 35, 40, 45, 50, 55
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
Another solution would be to call a script each 5 minutes that loads different parts (the 5 minute part, the hour part, the midnight part, etc.) depending on the time it is currently.
 

Danielx386

Member
Messages
711
Reaction score
9
Points
18
Can you have one php file, that will run both scripts and just have the one file running in cron?
 

admin500

New Member
Messages
46
Reaction score
0
Points
0
here is my crons tell me if this is correct or what i should do
5,15,25,30,35,40,45,50,55 * * * * 5 minute cron
0 * * * * hour cron
20 0 * * 0 weekly cron
10 0 * * * midnight cron
10,20 * * * * 5 min cron to cover 10 and 20 gap
 
Status
Not open for further replies.
Top