For an upcoming project one of the requests is that the client needs to be able to run a few custom queries on a specific section (queries are fixed, we know what these will be in advance) and then save the output to an xml file on the server. Bonus points if we can do this with a cron job, say daily.

I've been looking at several plugins (Sprout reports, Zenbu) but none really do what I need out of the box.

How would I go about handling this? Sorry if this question is too general, just looking for pointers on where to start. Any input appreciated!

1 Answer 1


Sounds like a pretty simple custom Craft plugin.

You'd add a controller to your plugin and an action method and allow anonymous access to it.

Your method would run any queries you need and save the results to an XML file on the server somewhere.

Then setup cron to execution the action at whatever interval you want.

0 3 * * * curl -s -o /dev/null "http://mydomain.com/actions/myplugin/myaction"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.