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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   1247 Views

Avatar
melatonin

Community Member, 6 Posts

9 May 2014 at 9:42pm

Hello,
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.

Avatar
bartvanirsel

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.