Discussió:Cron with Unix or Linux
Since wget is being used to run the cron.php script anyway, you can really run this ANYWHERE
- Brought this comment from 2.0 Cron comment page. It was unsigned/undated --Chris collman 20:09, 22 November 2011 (WST)
It is important to note that since the cron.php script is not run internally by Moodle, but by an outside interaction, you can really run a cron job on ANY server that runs the cron.php on your Moodle installation.
So, for example, if you have a Moodle install at an ISP that does not let you run cron jobs, but you have, say, a DSLline at home, you can use any of your Linux computers at home to run cron. (you do use Linux at home, right? :)
And the beauty of it is, the crontab line is *exactly* the same as listed in the main article. It just points to an outside URL.
Now, I mention this because at one point I had configured a server to run Moodle but, in the interest of security, I did not have wget available on the server. (cron was available, but not wget).
Well, the easiest thing to do was to just run a cron job somewhere else.
Alrighty, seeyalater!
Update and clarify
- Brought this comment from 2.0 Cron comment page. It was unsigned/undated --Chris collman 20:09, 22 November 2011 (WST)
- The whole cronclionly vs. shell invocation vs. "using wget" is completely misleading.
- while you can call cron.php using a web browser or a command line web "browser" like wget, curl, lynx from outside or inside the server. The latter commands can be scripted, e.g. to be called by cron.
- the "cronclionly" checkbox restricts the call to cron.php to calling it from inside the server and only using "bin/php". This can be scripted to be called by cron, as well.
- It should be said somewhere that using e.g. the "www-data" user in e.g. /etc/cron.d/moodle is far better than using /etc/crontab which is executed by root. AFAICS this is nowhere mentioned.
Linux _is_ Unix, Mac OS too
Why does it say "Unix or Linux"? Linux _is_ Unix!
One could say "Unix (and Linux)". But then Mac OS X is Unix too.
The best is to continue with the original article [Cron] and maintain the section "Unix" (it will be valid for Linux and Mac OS X). Visvanath Ratnaweera 06:00, 1 April 2012 (WST)
- Linux is not Unix. Literally. Look up the origin of the name. Similarly, MacOS is neither Unix nor Linux. It is based on one of the BSD variants, which is a Unix derivative. You could say that all these things are more or less POSIX compliant, but I am not sure that is a useful thing to say.--Tim Hunt 16:50, 2 April 2012 (WST)
- Just noting that the page was renamed by Howard who gave the reason "Some might not associate Unix with Linux" https://docs.moodle.org/21/en/index.php?title=Cron_with_Unix_or_Linux&action=history --Helen Foster 13:37, 6 April 2012 (WST)
- I don't see this as a (pedantic?) argument about what is derived from what or what it is called, or indeed a history lesson. It's about organising the information in a way that (tries to) keep it sane. It's bad enough as it is for many installers. It doesn't hurt to emphasise that these instructions cover all variations of Unix and Linux. Regarding OSX, although these instructions will work, the 'approved' method of running periodic jobs is not using Cron at all. --Howard Miller 16:47, 17 May 2012 (WST)