-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[macos] Crontab fix quick guide #122
Comments
Thanks a lot I think it's cool that you also care about the Mac support :) I can only test now and then, for Windows, in a VM, but nothing more. If you are interested you can also change the wiki entry directly. I think it's best to link to the wiki at the end of the |
I have changed the description, would be great if you could test this before the release :) |
If by test you mean repeat the procedure I described, I have just tried it again and it works as expected. Only addition I would make is to run Also article 2 can be reassumed in: just add
|
Actually I meant if you could download the master branch and check if on macOS at the end of the execution of I have just added the suggestion with |
Updated I will test master in the following days |
I now also recommend to pipe stdout to |
It is now released, you can test it in the new version :) |
Tested on new version, this is my output (correct)
Running it with the cronjob displayed upon configuration (only changed 15 to 1):
The log is weird but moodle-dl works as expected.
However I still receive cron mail as follows:
I think that this is due to In conclusion my only working crontab is:
I suggest to correct with this format. |
Moodle-dl does not print anything in std-err, so The only difference is that when an error occurs, moodl-dl exits with 1 instead of 0 and thus causes cron to send out a mail. Like in your test, there was already another moodl-dl running, so the instance failed and made cron send a mail. as your linked guide recommends, the best would be to simply write |
Since I spent some time dealing with crontab on macos I'll quickly describe here how to set it up correctly as it could be helpful for others.
Do as reported in the guide, but make sure to use the absolute path of moodle-dl:
crontab -e
*/15 * * * * cd "/absolute/path/to/moodle/folder" && /Users/your_user/Library/Python/3.8/bin/moodle-dl
To get your actual moodle-dl location run
which moodle-dl
.Now give cron permission to execute commands as shown here.
Finally if you want to remove those annoying mail messages in the terminal follow this guide.
The text was updated successfully, but these errors were encountered: