
28th March 2012, 05:20
|
|
Junior Member
|
|
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Cron Job Setup?
Hi,
I'm trying to setup a Cron Job to run at 12am everyday, could someone expain what the settings would be?
This is what I have for the command to run:
/usr/bin/wget -q /var/www/domain/web/cron/index.php
Thanks very much
|

28th March 2012, 07:58
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,184 Times in 3,202 Posts
|
|
Minute: 0
Hour: 12
All other fields except of the commain field: *
The command would be:
http://yourdomain.com/cron/index.php
The wget command is wrong as you cant exec php files with wget by specifying a file path, wget requires a url and beside that, ispconfig has a builtin url cron function, so you dont need wget at all and just enter the url starting with http into the command field.
|

28th March 2012, 20:13
|
|
Junior Member
|
|
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Perfect thanks,
What's the best way to test the Cron, without waiting until 12am?
Thanks
|

29th March 2012, 08:09
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,184 Times in 3,202 Posts
|
|
There are severaloptions:
a) If you just want to test the cron script, then enter:
http://yourdomain.com/cron/index.php
in your broser, it will execute the script like cron will do it.
b) Change the time of the cronjob so that it executes earlier.
|

30th March 2012, 13:07
|
|
Junior Member
|
|
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
If I type the address into the address bar my Cron job runs, but doesn't run within the ISPconfig panel.
Minutes e.g. *, */3, 10-20 = 0
.Hours e.g. *, */2, 0, 10-12 = 12
.Days of month e.g. *, */4, 1-5 = *
.Months e.g. *, 1-6 = *
.Days of week e.g. *, 0, 1-5 = *
Command to run (commands are executed via sh, urls via wget = http://www.mydomain.com/cron/index.php
.Active
Am I missing something?
Thanks
|

31st March 2012, 11:49
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Please check your syslog for cron errors.
|

3rd April 2012, 01:07
|
|
Junior Member
|
|
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Where would it be located? I can't seem to find it.
Thanks
|

3rd April 2012, 07:20
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,184 Times in 3,202 Posts
|
|
It is in /var/log/
|

6th April 2012, 15:00
|
|
Junior Member
|
|
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
HTML Code:
Apr 6 00:00:01 server1 CROND[22363]: (root) CMD (/usr/lib64/sa/sa1 -S DISK 1 1)
Apr 6 00:00:01 server1 CROND[22364]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Apr 6 00:00:01 server1 CROND[22362]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
Apr 6 00:01:01 server1 CROND[22429]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Apr 6 00:01:01 server1 CROND[22430]: (root) CMD (run-parts /etc/cron.hourly)
Apr 6 00:01:01 server1 run-parts(/etc/cron.hourly)[22430]: starting 0anacron
Apr 6 00:01:01 server1 anacron[22458]: Anacron started on 2012-04-06
Apr 6 00:01:01 server1 anacron[22458]: Jobs will be executed sequentially
Apr 6 00:01:01 server1 anacron[22458]: Normal exit (0 jobs run)
Apr 6 00:01:01 server1 run-parts(/etc/cron.hourly)[22461]: finished 0anacron
Apr 6 00:01:01 server1 run-parts(/etc/cron.hourly)[22430]: starting awstats
Apr 6 00:01:01 server1 run-parts(/etc/cron.hourly)[22472]: finished awstats
Apr 6 00:01:01 server1 run-parts(/etc/cron.hourly)[22430]: starting mcelog.cron
Apr 6 00:01:01 server1 run-parts(/etc/cron.hourly)[22479]: finished mcelog.cron
Apr 6 00:02:01 server1 CROND[22483]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Apr 6 00:03:01 server1 CROND[22506]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Apr 6 00:04:01 server1 CROND[22526]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Apr 6 00:05:01 server1 CROND[22560]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
Apr 6 00:05:01 server1 CROND[22561]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Apr 6 00:06:01 server1 CROND[22652]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Apr 6 00:07:01 server1 CROND[22676]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Apr 6 00:08:01 server1 CROND[22701]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Apr 6 00:09:01 server1 CROND[22724]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
Not sure but is this what your looking for? This is the "Cron" file.
I just posted the Mid Night section. There is a ton of lines in here but a lot are just repeats.
Thanks
|

7th April 2012, 10:37
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Is your cron job listed in that log file?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 17:52.
|
Recent comments
1 day 8 hours ago
1 day 17 hours ago
1 day 20 hours ago
1 day 21 hours ago
1 day 23 hours ago
2 days 46 min ago
2 days 2 hours ago
2 days 3 hours ago
2 days 19 hours ago
2 days 20 hours ago