Hi Elgg'ers,
I was wondering if it is possible to set up a cronjob that runs a script that you can normally only run as admin
I use the plugin SNA4elgg, which on the admin page, has it's own section and a download button. I have already figured out how to save that file onto my filesystem on the server. But now i would like to run this script periodically, so i don't have to do this every day manually. I would really appreciate some hints into doing this. Thank you
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Cim@manacim

Cim - 0 likes
- iionly@iionly

iionly - 0 likes
- Edease@Edease

Edease - 0 likes
You must log in to post replies.Normally you would run this on the backend via control panel from your hosting. Cron isn't an Elgg thing, it's a server thing.
You can disable the access level handling within the callback function you register for the cron plugin hook. Then you can access entities during the cronjob execution that would require an admin to be logged in otherwise.
Register in the init function of your plugin:
and then add the callback function to be executed during the daily cronjob:
Just exactly what I needed! Many thanks.