Forums | Mahara Community

Support /
CRON not running


Robert Lyon's profile picture
Posts: 774

23 October 2018, 10:29

Hi Majed,

There are two things happening here when we talk about the cron running:

1) Does the call to the cron.php script run and succeed?
2) Do all the cron step functions run and finish successfully?

Your output and 'succeeded' status looks to be for point 1.

The cron.php script is designed to work out what Mahara PHP functions need to be run and then call each of them one at a time. The cron.php file itself does not to stop/fail if any of those functions fail to run through fully.

Just before each function is called it sets a bit of data (a lock) in the database's config table with 'field' column value beginning with '_cron_' and rest of the string indicating what function it was trying to call.

And once that particular function succeeds the bit of data is then deleted from config table.

But if a particular function fails before finishing then the lock will remain.

So in summary what can happen is the call to cron.php succeeds but one (or more) of the called functions fails and it is this failure(s) that cause the 'CRON IS NOT RUNNING' message. What it really is meaning to say is 'CRON IS NOT RUNNING CORRECTLY'.

To work out why a cron function is failing you will need to look at the error log around the time the particular function failed.

Cheers

Robert

Majed Pramanik's profile picture
Posts: 12

24 October 2018, 15:23

Hi Robert,

Thanks so much for your reply.

I have checked my database but there's no error. 

For your reference, please see database information below:

(1) artefact_config

 
  # Name Type Collation Attributes Null Default Comments Extra Action
1 pluginPrimaryIndex varchar(100) utf8_general_ci   No None    
2 fieldPrimary varchar(100) utf8_general_ci   No None    
3 value text utf8_general_ci   No None    

 

(2) artefact_cron

 
  # Name Type Collation Attributes Null Default Comments Extra Action
1 pluginPrimaryIndex varchar(255) utf8_general_ci   No None    
2 callfunctionPrimary varchar(255) utf8_general_ci   No None    
3 nextrun datetime     Yes NULL    
4 minute varchar(25) utf8_general_ci   No *    
5 hour varchar(25) utf8_general_ci   No *    
6 day varchar(25) utf8_general_ci   No *    
7 month varchar(25) utf8_general_ci   No *    
8 dayofweek varchar(25) utf8_general_ci   No *    

 

(3) auth_config:

same as like "artefact_cofig"

(4) auth_cron:

same as like "artefact_cron"

(5) blocktype_config

same as like "artefact_cofig"

(6) blocktype_cron:

same as like "artefact_cron"

please could you have look. Many thanks

 

regards

Majed

Majed Pramanik's profile picture
Posts: 12

24 October 2018, 15:30

Hi Robert,

Thank you for your reply.

I have checked my database but there's no errors. For your reference, please could you see below my database table:

(1) artefact_cofig:

 
  # Name Type Collation Attributes Null Default Comments Extra Action
1 pluginPrimaryIndex varchar(100) utf8_general_ci   No None    
2 fieldPrimary varchar(100) utf8_general_ci   No None    
3 value text utf8_general_ci   No None    

 

(2) artefact_cron:

 
  # Name Type Collation Attributes Null Default Comments Extra Action
1 pluginPrimaryIndex varchar(255) utf8_general_ci   No None    
2 callfunctionPrimary varchar(255) utf8_general_ci   No None    
3 nextrun datetime     Yes NULL    
4 minute varchar(25) utf8_general_ci   No *    
5 hour varchar(25) utf8_general_ci   No *    
6 day varchar(25) utf8_general_ci   No *    
7 month varchar(25) utf8_general_ci   No *    
8 dayofweek varchar(25) utf8_general_ci   No *    

 

(3) auth_config:

same as like "artefact_cofig"

(4) auth_cron:

same as like "artefact_cron"

(5) blocktype_config

same as like "artefact_cofig"

(6) blocktype_cron:

same as like "artefact_cron"

Many thanks

(Majed)

Majed Pramanik's profile picture
Posts: 12

24 October 2018, 15:36

Hi Robert,

Thank you for your reply.

I have checked my database but there's no errors. For your reference, please could you see below my database table:

(1) artefact_cofig:

 
  # Name Type Collation Attributes Null Default Comments Extra Action
1 pluginPrimaryIndex varchar(100) utf8_general_ci   No None    
2 fieldPrimary varchar(100) utf8_general_ci   No None    
3 value text utf8_general_ci   No None    

 

(2) artefact_cron:

 
  # Name Type Collation Attributes Null Default Comments Extra Action
1 pluginPrimaryIndex varchar(255) utf8_general_ci   No None    
2 callfunctionPrimary varchar(255) utf8_general_ci   No None    
3 nextrun datetime     Yes NULL    
4 minute varchar(25) utf8_general_ci   No *    
5 hour varchar(25) utf8_general_ci   No *    
6 day varchar(25) utf8_general_ci   No *    
7 month varchar(25) utf8_general_ci   No *    
8 dayofweek varchar(25) utf8_general_ci   No *    

 

(3) auth_config:

same as like "artefact_cofig"

(4) auth_cron:

same as like "artefact_cron"

(5) blocktype_config

same as like "artefact_cofig"

(6) blocktype_cron:

same as like "artefact_cron"

Many thanks

(Majed)

Majed Pramanik's profile picture
Posts: 12

24 October 2018, 15:37

Hi Robert,

Thank you for your reply.

I have checked my database but there's no errors. For your reference, please could you see below my database table:

(1) artefact_cofig:

 
  # Name Type Collation Attributes Null Default Comments Extra Action
1 pluginPrimaryIndex varchar(100) utf8_general_ci   No None    
2 fieldPrimary varchar(100) utf8_general_ci   No None    
3 value text utf8_general_ci   No None    

 

(2) artefact_cron:

 
  # Name Type Collation Attributes Null Default Comments Extra Action
1 pluginPrimaryIndex varchar(255) utf8_general_ci   No None    
2 callfunctionPrimary varchar(255) utf8_general_ci   No None    
3 nextrun datetime     Yes NULL    
4 minute varchar(25) utf8_general_ci   No *    
5 hour varchar(25) utf8_general_ci   No *    
6 day varchar(25) utf8_general_ci   No *    
7 month varchar(25) utf8_general_ci   No *    
8 dayofweek varchar(25) utf8_general_ci   No *    

 

(3) auth_config:

same as like "artefact_cofig"

(4) auth_cron:

same as like "artefact_cron"

(5) blocktype_config

same as like "artefact_cofig"

(6) blocktype_cron:

same as like "artefact_cron"

Many thanks

(Majed)

15 results