#1  
Old 28th March 2012, 05:20
D-Spayre D-Spayre is offline
Junior Member
 
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 28th March 2012, 07:58
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 28th March 2012, 20:13
D-Spayre D-Spayre is offline
Junior Member
 
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Perfect thanks,

What's the best way to test the Cron, without waiting until 12am?

Thanks
Reply With Quote
  #4  
Old 29th March 2012, 08:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 30th March 2012, 13:07
D-Spayre D-Spayre is offline
Junior Member
 
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #6  
Old 31st March 2012, 11:49
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Please check your syslog for cron errors.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 3rd April 2012, 01:07
D-Spayre D-Spayre is offline
Junior Member
 
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Where would it be located? I can't seem to find it.

Thanks
Reply With Quote
  #8  
Old 3rd April 2012, 07:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

It is in /var/log/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 6th April 2012, 15:00
D-Spayre D-Spayre is offline
Junior Member
 
Join Date: Mar 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #10  
Old 7th April 2012, 10:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

Is your cron job listed in that log file?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron job runs on both master and mirror server, why? snowfly Installation/Configuration 7 15th May 2013 21:37
How To Setup A Cron Job to Copy Previous Month Apache Log Files To A Backup Directory MrCompTech Tips/Tricks/Mods 0 8th December 2011 20:33
Cron Job delgado2061 Installation/Configuration 0 1st January 2011 03:09
Problem getting cron job to run and in need of help :) MrCompTech General 7 27th July 2010 09:50
Cron job question autogun General 2 22nd December 2009 11:54


All times are GMT +2. The time now is 14:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.