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

Implementing a Scheduled Task


Go to End


10 Posts   10080 Views

Avatar
SS_Learner

Community Member, 20 Posts

23 July 2012 at 3:27pm

Hello Friends

I have a question to ask you about the scheduling of task.
I have made a process to run daily..
for that i have create a folder in my root Cal\code\Controller\task
which is having the following code as u provided in the example

class MyTask extends DailyTask {

function process() {
Product::updatePrice();
}
}

Can u tell me please as how can i test this in a browser manually as i am doing this in my localhost.

Any help is appreciated...

Avatar
Willr

Forum Moderator, 5523 Posts

23 July 2012 at 6:28pm

Can u tell me please as how can i test this in a browser manually as i am doing this in my localhost.

You can't with DailyTasks. Though you can still run this through a terminal

sake /DailyTask

If you make you task a subclass of BuildTask you can run it both through the web and terminal

http://yoursite.dev/dev/tasks/YourTaskName
sake dev/tasks/YourTaskName

Go to Top