Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

CronJob <-> Tasks

Go to End

2 Posts   750 Views


Community Member, 6 Posts

9 May 2014 at 9:42pm

i need to use cronjobs with the silverstripe framework environment.
In the silverstripe documentation i have found a solution with sake and tasks.
I have three questions/problems with this solution.

1) The Task prints "Running Task MyTitle" always on run. A cronjob should not give output on default. If i pipe this to /dev/null, my full output would removed.
2) How I can control the exitcode. My return value from the run methode was not used.
3) All people has access to run the tasks. My cronjobs should by runable from commandline only

Sorry for my bad english.
Thank you for help.


Community Member, 96 Posts

21 May 2014 at 7:05pm

You can also do this by creating your own custom method in a controller and return nothing and create a cronjob on your webserver.