I am working on a xp app that needs to perform a task in the background at regular intervals. It doesn’t look like the task lib supports submitting a task with an interval or anything like that.
What is the “best practice” code approach for running a js task, lets say every minute or every 5 minutes?
I would prefer to not depend on having a different app installed for my app to work.
Now you can declare tasks in a xml file with parameters and its own names (just like a service) and then you can set up a cron job and inside of it run “submitNamed” function of the tasklib
Enonic uses the cronjob app from Market successfully in multiple projects to do this. In the future we will build something the Job scheduler from good-old Enonic CMS.
Can I make the cronjob app a gradle dependency in my my app, so I am sure that it is available when someone installs my app, or will I have to specify in the “Installation” part of a readme that whoever installs my app will also have to install the cronjob app ?