Cron not running

Cron not running

by Dave Pughe-Parry -
Number of replies: 8

Hello

I have installed 2.9, There is not any data yet

The notification says the cron has not been run for more than 24 hours. I ran the cron using both .../admin/cron.php as well as .../admin/cli/cron.php.

This is the email that I got:

Status: 404 Not Found
X-Powered-By: PHP/5.6.30-1~dotdeb+7.1
Content-type: text/html; charset=UTF-8

No input file specified.

I have an older installation (2.7) on another site - that also says the cron is not running, but you can see that it is in the attachments.

Any help will be gratefully accepted.

Dave

Attachment 2017-04-14_1600.png
Attachment 2017-04-14_1604.png
Average of ratings: -
In reply to Dave Pughe-Parry

Re: Cron not running

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I rather think, what you actually put for your '...' might be the critical thing here. It's obviously wrong as you are not finding these scripts. 

You can *only* run the cli version from the command line, not through a web browser. 

The best way to run this is to use the cli version and use whatever cron facilities your host provides. You will need to ask or check documentation (their's not ours) for that. 


In reply to Dave Pughe-Parry

Re: Cron not running

by m question -

how do you run your cron

In reply to m question

Re: Cron not running

by Dave Pughe-Parry -

In the Cpanel there is a Cron Job Manager, I set it up there, it asks if I want to run it, I have attached the advanced view of the cron, after the update it asks for the run. I have done it on both the ...admin/cron.php, and on ...admin/cli/cron.php

I am getting emails every 2 hours - the minimum period on my shared server - as per the attached.

Thanks

Attachment 2017-04-16_1432.png
Attachment 2017-04-16_1441.png
Attachment 2017-04-16_1444.png
In reply to Dave Pughe-Parry

Re: Cron not running

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It looks like it could be fine - apart from the 'password=' bit. Cron doesn't have a password option. I'm unsure what you think that does. 

You are getting the messages because you are not redirecting the output. You need to put ' >/dev/null' on the end (it says this in the instructions somewhere - Cron). 

The output you are getting looks perfectly ok. Are you sure that this is the cron script for the correct Moodle and not some other installation?

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Cron not running

by Dave Pughe-Parry -
Hello Howard

Thanks so much, It's working!

I followed the instructions from my hosting company. I actually ended up trying 3 different passwords, but it made no difference. Taking out that section of the script has worked.

I am learning!

Speaking of which, I'm looking at acquiring the necessary skills to be able to operate Moodle - install, and manage - have you any ideas on what courses, or books I should start with? I would appreciate any guidance in this regard.

Best wishes & thanks again
Dave

In reply to Dave Pughe-Parry

Re: Cron not running

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Dave,

Do you happen to have a Raspberry Pi single board computer? A version 2 or 3 will work. If so, I can give you access to a Moodle "book" activity that will show you how to set up a Pi as a personal Moodle development server. I've even got directions for doing the same thing with an Odroid-XU4.

In reply to AL Rachels

Re: Cron not running

by Dave Pughe-Parry -

Hello Daniel

Thanks for your kind offer. No I don't have a Raspberry Pi, but you sparked a thought, and I dug out an old laptop and have loaded Linux on it. I have also downloaded lists of Linux commands and will start playing with Terminal. I also have an old site that will eventually die a natural death to practice on.

I am really enjoying Moodle, more than I did 2 years ago when we set up the above mentioned old site.

I have 2 more Moodle sites planned for later this year, so I need to learn the set up and management using command line without having to resort to those skills to be on standby.

Thanks again and best wishes

Dave


In reply to Dave Pughe-Parry

Re: Cron not running

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Dave,

That's one of the really nice things about Linux, it will run on just about anything. My son and I have both done the same thing with old laptops. In fact, we even improved their performance by removing the old 5400 RPM drives and replacing them with SSD's, using the 128GB size as prices are pretty reasonable now. If you do decide to try a SSD, look before you buy to make sure the drive connector is a standard SATA connector. I had one HP laptop with a proprietary drive connector and the nice SSD I bought for it wound up being a spare.

The reason I mentioned the Raspberry Pi is that with a couple of extra MSDC class 10 memory chips, you can try out multiple Linux distributions simply by powering down and changing the MSDC.  Small envelopes are handy for keeping track of the spare MSDC's and gives you a place to write notes as to what you have on the chip inside. As long as you don't go overboard adding a bunch of plugins and data, I've been able to use MSDC's as small as 8 GB. Anything bigger works fine and they are pretty cheap for anything 64 GB and smaller.