Well, some time ago my users started to complain that Moodle is not mailing forum posts and other notifications to their students. This used to work as it should, but one day it just stopped to work. Looking into things I found out that there is something wrong with cron.
Checking around for information I found out that Moodle documentation offers a complete cron setup manual.
Solution:
From command line I entered (as normal user) the command:
crontab -e
Usually, the “crontab” command will put you into the ‘vi’ editor. You enter “insert mode” by pressing “i”, then type in the line as above, then exit insert mode by pressing ESC. You save and exit by typing “:wq”, or quit without saving using “:q!” (without the quotes).
In my case it was mc and I entered:
*/5 * * * * /usr/bin/php /absolute_path_to_my_moodle_instalation/admin/cron.php > /dev/null
Saved the file and now I have cron telling PHP to run Moodle’s cron every five minutes and throw away all the input.