Best practice forum (Archived)

Command line cron not achieving same results as web cron run?

 
Amir Elion
Command line cron not achieving same results as web cron run?
by Amir Elion - Wednesday, 13 June 2012, 11:18 PM
 

We have a Totara 1.1.6 installation, on Windows IIS server.

The cron is set to run via scheduled task, every 5 minutes.

However, it seems that not all cron tasks are achieved. For instance, competency completions are not calculated. When admin runs cron via web (admin/cron.php) these are calculated correctly.

Cron log files does show as if completion should have run. See below:

Starting activity modules
Processing module function checklist_cron ...done.
Processing module function facetoface_cron ...
׳׳™׳ ׳×׳–׳›׳•׳¨׳•׳× ׳׳©׳׳™׳—׳”.
done.
Processing module function forum_cron ...Starting digest processing...
Cleaned old digest records
done.
Processing module function scorm_cron ...done.
Finished activity modules
Starting blocks
Processing cron function for totara_stats....done.
Finished blocks
Starting admin reports
Finished admin reports
Updating languages cache
Removing expired enrolments ...none found
Starting main gradebook job ...
done.
Starting processing the event queue...
done.
Starting the completion cron...
done
Starting the report builder cron...
Processing 2 scheduled reports
done.
Starting the competency cron...
done
Starting the reminder cron...
done
Starting local modules
Processing local module function cohort_cron ...Updating dynamic cohorts...
done.
Processing local module function program_cron ...No need to run program daily cron - has already been run today.
done.
Processing local module function reportbuilder_cron ...Processing 2 scheduled reports
done.
Processing local module function totara_msg_cron ...done.
Finished local modules
Running backups if required...
Checking backup status...INACTIVE
Backup tasks finished.
Running auth crons if required...
...preventing stats to run, more than 4 hours since scheduled time.
Cron script completed correctly
Execution took 2.302996 seconds

Any ideas why this should happen?

Simon Coggins
Re: Command line cron not achieving same results as web cron run?
by Simon Coggins - Sunday, 2 September 2012, 8:27 PM
Group Totara

Hi Amir,

Just wondering if you ever resolved this issue?

Without more detailed errors it's a tricky one for us to track down - it sounds like maybe there is a  file path reference that is relative rather than absolute, so it is failing when the cron is run from a different directory. Or perhaps your cron is being run as a different user with different permissions to the webserver?

Simon

Nikhil Bansal
Re: Command line cron not achieving same results as web cron run?
by Nikhil Bansal - Sunday, 21 February 2021, 1:08 AM
Group Partners

Hi.

I don't see below while running the cron, I have added rb_source in local with a report and it doesn't generate data. So, wondering if my local module is executed or not.

Starting local modules

Kindly suggest.


Regards,
Nikhil