Get Cron Job working

Get Cron Job working

by Stefan Hackel -
Number of replies: 9

Hello guys,

I set up a new moodle system on a webserver (access to webserver only with credentials and with filezilla, no other webinterface like on a hosting service). I can call the cron file per web browser and it's working but how do I automatically set up the cron job to run every minute, even when I am not on the computer? I already have a script for it but I don't know if I understand the docs correctly on this.

Is there a possibility to run this script on my webserver to execute the cronjob?

Average of ratings: -
In reply to Stefan Hackel

Re: Get Cron Job working

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What operating system is it? How much access do you have? What does "only with credentials" mean?
In reply to Stefan Hackel

Re: Get Cron Job working

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
If there is no control panel, you must have ssh access?
In reply to Emma Richardson

Re: Get Cron Job working

by Stefan Hackel -
Thanks for the quick responses! I am using Windows 10 and can only connect to the webserver via ftp, so no webinterface is available. I tried connecting over SSH with PuTTY some days ago but when I logged in, the PuTTY window closed itself and that was it.
In reply to Stefan Hackel

Re: Get Cron Job working

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Are you sure you can provide a service (to others) under these constraints? Or, are you just experimenting alone?
In reply to Stefan Hackel

Re: Get Cron Job working

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
In reply to Visvanath Ratnaweera

Re: Get Cron Job working

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 assumed those were the docs he didn't fully understand. Although, that's always risky wink
In reply to Howard Miller

Re: Get Cron Job working

by Stefan Hackel -
I read those docs but either I overlooked something or didn't understand it correctly that's why I asked for help. I saw the link for Windows under "Setting up cron on your system" but what I understood is that when my computer is shut down the cron job doesn't work or am I wrong? If I am right here I didn't read the possibility to let the cron job run on the webserver.
In reply to Stefan Hackel

Re: Get Cron Job working

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If Moodle is running on a server then you don't shut it down.

If you're running it on a desktop just to "try it" then it doesn't matter. Cron can run while the PC is switched on. That'll do fine. Obviously (I hope), you can't run a service for real users on a computer you shut down.