In case you didn't know, Structr has a built-in scheduling service that can execute periodic tasks. It is configurable with a syntax very similar to the one of the UNIX
crontab file, hence the name CronService.
With this change, the CronService gains the ability to execute scripts stored in a SchemaMethod instance. To use that feature, create a new object of type
SchemaMethod in the Structr Backend, set a name, and put the desired scripting code in the
structr.conffile like this:
# Configure two periodic tasks CronService.tasks = countUsers createReports # Run countUsers every day at 4:00 countUsers.cronExpression = 0 0 4 * * * # Run createReports each hour on Mondays during the first 10 days in April and October createReports.cronExpression = 0 0 * 1-10 4,10 1
You will find the new feature in the current master branch on GitHub, or in the next snapshot of Structr 2.1.0 which will be released shortly.