Forums | Mahara Community

Support /
CRON not running


Majed Pramanik's profile picture
Posts: 12

23 September 2018, 12:42

Hi,

I set up CRON using cpanel and I used the following command: 

curl http://xxxx.com/lib/cron.php

Still it's showing the same message that CRON IS NOT RUNNING.
Please help...!!

I got the following report from easycron:

Logs and Predictions

Past Now Future
 
Schedule Time Start Time End Time Execution Time (second) HTTP Code Status Output
2018-09-23 01:04:00 2018-09-23 01:04:02 2018-09-23 01:04:03 0.767177 404 Failed Detail
HTTP/1.1 404 Not Found
Kristina Hoeppner's profile picture
Posts: 4717

23 September 2018, 21:29

Hi Majed,

It's not a command to run, but a command to put into your crontab file as per installation instructions. When you put it into the file, you do need the stars before "curl" so that the cron is executed automatically.

Cheers

Kristina

 

Majed Pramanik's profile picture
Posts: 12

23 September 2018, 22:46

Hi Kristina,

Thank you for your answer. However, I already start with 'curl' but still not working

thanks

(Majed)

Cecilia Vela's profile picture
Posts: 110

27 September 2018, 17:05

Hi Majed,

Please go to Admin menu->Admin home->Overview and check the panel "Site information". There you will see a message if the cron is not running.

You could test it manually to check any error messages. To do this try setting the productionmode in your config.php file

$cfg->productionmode = false;

Run the cron manually going to the URL http://xxxx.com/lib/cron.php and you should see the logs on your browser.

After this please remember to set back $cfg->productionmode as it was before.

If you need more help, you can paste the error you get in here so we can take a look. You can also find a bit more information about how to set up the cron in here.

Cheers,

Cecilia

Majed Pramanik's profile picture
Posts: 12

27 September 2018, 22:55

Hi Cecilia,

Thank you for your reply.

I changed my configuration on config.php:

$cfg->productionmode = false;

When I run from my browser, it showed this message: 

"You do not have access to this functionality. Please provide the value for "urlsecret" from your config.php file as part of the URL"

Also I tried production mode = true, still getting the same message.

However, When I tried to execute the CRON JOB to the EASYCRON.COM, I received the following message: 

Schedule Time Start Time End Time Execution Time (second) HTTP Code Status Output
2018-09-27 11:32:00 2018-09-27 11:32:02 2018-09-27 11:32:02 0.305953 200 Succeeded
2018-09-27 11:33:00 2018-09-27 11:33:02 2018-09-27 11:33:02 0.298542 200 Succeeded
2018-09-27 11:34:00 2018-09-27 11:34:02 2018-09-27 11:34:03 0.273806 200 Succeeded
2018-09-27 11:35:00 2018-09-27 11:35:02 2018-09-27 11:35:03 0.355665 200 Succeeded
2018-09-27 11:36:00 2018-09-27 11:36:02 2018-09-27 11:36:02 0.299421 200 Succeeded

When I clicked on the "VIEW OUTPUT", it provides the following message: 

Set-Cookie: mahara=f6ecd0a0440136932b5a9999cac466d281b167ed695424f53b176df4cdddcd37; path=/mahara/; HttpOnly
Server: Apache
X-Xss-Protection: 1; mode=block
Content-Type: text/html; charset=UTF-8
X-Permitted-Cross-Domain-Policies: master-only
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Date: Thu, 27 Sep 2018 10:36:02 GMT
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Vary: Accept-Encoding,User-Agent

<!doctype html>
<!--[if IE 8 ]><html lang="en" class="ie ie8"><![endif]-->
<!--[if IE 9 ]><html lang="en" class="ie ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]-->
<head data-basehref="http://xxx.com/mahara/">
<meta name="generator" content="Mahara 18.04 (https://mahara.org)" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta property="og:title" content=" - Mahara" />
<meta property="og:description" content="Mahara is an open source ePortfolio and social networking web application.
It provides users with tools to create and maintain a digital portfolio of their learning and social networking features to allow users to interact with each other." />
<meta property="og:image" content="http://xxxx.com/mahara/theme/raw/images/site-logo-facebook.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="viewport" id="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=10.0,initial-scale=1.0" />

-----

----- and so on....

 

I couldn't understand... Still, it's showing this message:  CRON is NOT RUNNING

Please help. Many thanks for your help.

Regards

Majed

 

Robert Lyon's profile picture
Posts: 749

28 September 2018, 7:27

Hi Majed,

The "CRON is NOT RUNNING" message is displayed if the following database call returns any rows:

SELECT * FROM cron WHERE nextrun IS NULL OR nextrun < CURRENT_DATE;

If that returns any rows it probably means the cron process began but didn't finish for some reason so the next thing to check is there was a lock set for the cron process that was not cleared when process finished:

SELECT * FROM config WHERE field LIKE '\_cron%';

If there are rows returned you can see which process fails. You can safely delete them and then re-run the cron again.

After the cron runs for a while check again for locks

SELECT * FROM config WHERE field LIKE '\_cron%';

If they are appearing again check the error logs for why they are failing

Cheers

Robert

 

Majed Pramanik's profile picture
Posts: 12

28 September 2018, 11:11

Hi Robert,

Thank you for your reply.

I couldn't understand from where could I check. Is it from config.php ? As I installed the Mahara using cpanel (shared hosting). Please could you guide me. If from config.php, what exact code may I need to write, please? Thank you so so much.

Note: I already checked in cofig.php, I haven't found anything that you've advised.

 

best regards

Majed

Robert Lyon's profile picture
Posts: 749

28 September 2018, 12:23

Hi Majed,

 

My apologies - I was meaning the 'config' table in the database. you should be able to run those database commands on your database and get some information about why your cron is saying it is not running

Cheers

Robert

Majed Pramanik's profile picture
Posts: 12

28 September 2018, 14:20

Hi Robert,
Thanks for getting back to me so quickly. Finally CRON is RUNNING.
After installing SSL certificate...!!! Wonderful....
Thanks again
 
regards
Majed
Majed Pramanik's profile picture
Posts: 12

09 October 2018, 12:35

Hi,

My "CRON was running". But again it's showing the same message: "CRON IS NOT RUNNING". 

I checked with easycron and it's showing succeed but I can not understand why this message's showing CRON IS NOT RUNNING.

For the reference, please see the EASYCRON result: 

 
 
 
Schedule Time Start Time End Time Execution Time (second) HTTP Code Status Output
2018-10-08 23:30:00 2018-10-08 23:30:03 2018-10-08 23:30:03 0.491491 200 Succeeded
2018-10-09 00:00:00 2018-10-09 00:00:03 2018-10-09 00:00:03 0.470034 200 Succeeded

When I clicked on VIEW OUTPUT, it's showing the bellow report:

Date: Mon, 08 Oct 2018 23:00:03 GMT
X-Permitted-Cross-Domain-Policies: master-only
Cache-Control: no-store, no-cache, must-revalidate
Vary: Accept-Encoding,User-Agent
Server: Apache
Content-Type: text/html; charset=UTF-8
X-Frame-Options: SAMEORIGIN
Pragma: no-cache
Set-Cookie: mahara=81d73821d4812a395a46aed39ebf7b5ba4cd6d24572ba624b86a243becaa1b80; path=/mahara/; secure; HttpOnly
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=63072000
Expires: Thu, 19 Nov 1981 08:52:00 GMT

<!doctype html>
<!--[if IE 8 ]><html lang="en" class="ie ie8"><![endif]-->
<!--[if IE 9 ]><html lang="en" class="ie ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]-->
<head data-basehref="https://xxxx.com/mahara/">
<meta name="generator" content="Mahara 18.04 (https://mahara.org)" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta property="og:title" content=" - Mahara" />
<meta property="og:description" content="Mahara is an open source ePortfolio and social networking web application.
It provides users with tools to create and maintain a digital portfolio of their learning and social networking features to allow users to interact with each other." />
<meta property="og:image" content="https://xxx.com/mahara/theme/raw/images/site-logo-facebook.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="viewport" id="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=10.0,initial-scale=1.0" />

<title> - Mahara</title>
<script type="application/javascript">
var config = {
'theme': [],
'sesskey' : '',
'wwwroot': 'https://xxxx.com/mahara/',
'loggedin': 0,
'userid': 0,
'mobile': 0,

------

----

and so on....

I cannot understand why it's happening....  As I am using shared hosting. Many thanks

 

(Majed)

15 results