Jump to:

23368 Posts in 18145 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » Implementing a Scheduled Task

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

Page: 1 2
Go to End
Author Topic: 6175 Views
  • SS_Learner
    Avatar
    Community Member
    18 Posts

    Re: Implementing a Scheduled Task Link to this post

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

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Implementing a Scheduled Task Link to this post

    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

    6175 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.