Setting Up Cron Job

Setting Up Cron Job

door curt bixel -
Aantal antwoorden: 11

I can get cron to run by typing the following command in the URL box on any browser:

 

http://my_domain.com/admin/cron.php

(I changed the URL above a bit for privacy)

I have tried to automate this by using the "Cron Jobs" programmy thingy on cPanel on my server space. 

I enter the same command as I enter in the URL box, but when it tries to run automatically, it does not work.

Any ideas?

Gemiddelde van de beoordelingen:  -
Als antwoord op curt bixel

Re: Setting Up Cron Job

door E. L. Cooper -

That is not how to set it up in cpanel but how it is done depends on the cpanel version. Here is a video that should help

 If your cpanel does not work this way ask your webhost for help . They may be running custom modifications to cpanel.

Gemiddelde van de beoordelingen:  -
Als antwoord op E. L. Cooper

Re: Setting Up Cron Job

door curt bixel -

I got all that part set up correctly.  I just don't seem to be able to figure out what to type in the command window.  I can run cron just fine by typing the path to cron.php into the URL bar in a browser, but if I copy this command into Cron Jobs, it won't work.

Gemiddelde van de beoordelingen:  -
Als antwoord op curt bixel

Re: Setting Up Cron Job

door Howard Miller -
Foto van Core developers Foto van Documentation writers Foto van Particularly helpful Moodlers Foto van Peer reviewers Foto van Plugin developers

It would help if you mentioned which version of Moodle. Do note that if you are usinng commmand line (CLI) PHP to run cron on 2.0+ then the path is different. It's /path/to/your/moodle/admin/cli/cron.php  (note the 'cli' in there)

Gemiddelde van de beoordelingen:  -
Als antwoord op Howard Miller

Re: Setting Up Cron Job

door E. L. Cooper -

If you set your server up to run crons the crons will run. There is no special command to use. Command line activated cron is a script in moodle that runs crons manually which can be handy for diagnostics but if your server is running cron job moodle is running cron jobs.

Gemiddelde van de beoordelingen:  -
Als antwoord op Howard Miller

Re: Setting Up Cron Job

door Ola Shoubaki -
I am having the same problem. In my cpanel (blue host) there is a 'command' line that cannot be left empty. I am running moodle 2.3. Please help with what to put in the command line, thank you! glimlach
Gemiddelde van de beoordelingen:  -
Als antwoord op Ola Shoubaki

Re: Setting Up Cron Job

door Rick Jerz -
Foto van Particularly helpful Moodlers Foto van Testers

I am not sure if this will help, but I too use cPanel's Cron utility and here is what I put in the command line.

/usr/bin/wget -O - -q "http://ricksdomain.com/moodle/admin/cron.php" > /dev/null 2>&1

Of course, you need to modify the http: address to match yours.  Also, note the location of where my "wget" is.  Check to see that yours is in the same place.

Gemiddelde van de beoordelingen:  -
Als antwoord op curt bixel

Re: Setting Up Cron Job

door Louise Kearins -

Hi I'm having a similar problem with InMotion hosting, using Moodle 2.3

They tell me my business pro package won't allow me to use a widget.

I have also tried /home/xxx/public_html/moodle/admin/cli/cron.php

But, it tells me access denied, this was the same error i got with the widget.

When i run it directly in the web browser it works.

Does anyone know if there is a solution?

I have read the moodle docs on cron but the "techie" talk is confusing I don't what to do.

Gemiddelde van de beoordelingen:  -
Als antwoord op curt bixel

Re: Setting Up Cron Job

door Louise Kearins -

Hi I'm having a similar problem with InMotion hosting, using Moodle 2.3

They tell me my business pro package won't allow me to use a widget.

I have also tried /home/xxx/public_html/moodle/admin/cli/cron.php

But, it tells me access denied, this was the same error i got with the widget.

When i run it directly in the web browser it works.

Does anyone know if there is a solution?

I have read the moodle docs on cron but the "techie" talk is confusing I don't what to do.

Gemiddelde van de beoordelingen:  -
Als antwoord op Louise Kearins

Re: Setting Up Cron Job

door Louise Kearins -

I think i've cracked it!! A lot of trial and error.grote ogen

Here is what i did for anyone with the same problem.

/usr/bin/php /home/xxx/public_html/moodle/admin/cli/cron.php

Gemiddelde van de beoordelingen:  -
Als antwoord op curt bixel

Re: Setting Up Cron Job

door D z -

If you cannot use Crontab normally, or your hosting doesn't offer Cron feature, webcron service like easycron.com may serve well.

Gemiddelde van de beoordelingen:  -