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.

General Questions /

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

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

CronJob <-> Tasks


Reply


2 Posts   298 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, 94 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.