crons jobs

Status
Not open for further replies.

damaged-city69

New Member
Messages
10
Reaction score
0
Points
0
hi i dont know yesterday i setup the crons but it is not working not even once the corn file were ran
 

vv.bbcc19

Community Advocate
Community Support
Messages
1,524
Reaction score
92
Points
48
Try the format used in these samples.Revert back if you still have a problem.

Run 'foo.php' every Sunday, capturing output:

* * * * Sun /usr/local/bin/php $HOME/foo.php >> $HOME/log/foo.txt 2>&1

Run 'email.php' every day at midnight:

0 0 * * * /usr/local/bin/php $HOME/email.php

Run job1 every 10 minutes (except on the hour), job2 on the hour (except at midnight), job3 at midnight (except Monday) and job4 at midnight on Monday, capturing output:

10-50/10 * * * * $HOME/bin/job1 >> $HOME/log/jobs.txt 2>&1
0 1-23 * * * $HOME/bin/job2 >> $HOME/log/jobs.txt 2>&1
0 0 * * 0,2-6 $HOME/bin/job3 >> $HOME/log/jobs.txt 2>&1
0 0 * * Mon $HOME/bin/job4 >> $HOME/log/jobs.txt 2>&1
 

damaged-city69

New Member
Messages
10
Reaction score
0
Points
0
still its not working i first i used this format
thecronfile.php?secret=code
and than i used this format
/$home/bin/folder/cronfile.php?secret=code
(instead of the secret there is another name
and there is a number instead of the code)
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Quite a few of your cron-job's will self terminate. Free hosting only allows them to execute every 5 minutes; any of them that execute within 5 minutes of each other (including the minute-by-minute cron which will conflict with everything) will disappear without a trace as it's not allowed.

On free hosting you can have 1 that executes every 5 minutes; if you upgrade to Prime, Illuminated, or Premium that limit goes away, but with the current setup for crons I can see on your account, they'll keep disappearing.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Did you write this script yourself or is it by a third party? Why do you need the secret code?
 

damaged-city69

New Member
Messages
10
Reaction score
0
Points
0
so that no one can run them thts why

---------- Post added at 07:27 PM ---------- Previous post was at 07:19 PM ----------

so the Abuse Compliance Officer meant that i can only have 1 cron that also 5 min right.uys plzz explain me properly
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
From the TOS:
* Crons: We do not allow more than one cron within a 5 minute time period per account. This means if you have two crons you must make sure that both do not go off within 5 minutes of each other.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
so that no one can run them thts why

---------- Post added at 07:27 PM ---------- Previous post was at 07:19 PM ----------

so the Abuse Compliance Officer meant that i can only have 1 cron that also 5 min right.uys plzz explain me properly

It is clear that having the code is because you only want to be the only person to run it.
But if you run it from a cron and store it outside the Document Root, nobody can run it but you.
Running it directly will not include the query string. You have to access it via the web, ie wget

The system is set up so that you must have 5 minutes between any execution of cron jobs.
a) You cannot run 1 minute crons. They must be at least 5 minutes
b) You cannot run one job at 0,5,15 etc and another at 2,7,12 etc. They are not spaced 5 minutes apart. Same thing goes if you run one every five minutes and another at 0 and 30 each hour.
 
Status
Not open for further replies.
Top