+ Start a Discussion

Is it Possible to Schedule the tasks

Hi All,


Is it possible to schedule the Tasks..



Can you suggest me please??







You can’t schedule a task when you create a task from standard SF User interface.

But there is work around for this. It needs to be implemented from Apex Coding.


The steps for this is

1)      Create an Apex class which can be schedulable (implement schedulable interface).

2)      Write code to create a task in a method and call that method from somewhere.

3)      Then schedule the class so that the task will be created and assigned as you required.

This is one way of achieving the scheduling the tasks.


Or you can write separate class and method to create task and call that class from a scheduler class.


Find the Below simple Apex code to create task

Task t = new Task(Subject = 'Task name' , Description =  'test' , Priority = 'low' , IsReminderSet = true , ReminderDateTime = System.now() ,Status = 'Not Started' , OwnerID = ownerID);
Database.DMLOptions dlo = new Database.DMLOptions();
dlo.emailHeader.triggerUserEmail = true;