+ Start a Discussion
N@niN@ni 

Difference between Time based Work flows and schedule apex class...?

Can any body help me when do we use Time based work flows and when do we use Schedule apex....? and also Difference between Time based workflows and schedule apex......?

Satish_SFDCSatish_SFDC

Time based workflow is just a workflow which fires and then executes the actions on a specified time. These actions can be any combination of Email Alerts, Tasks, Field Update, Outbound message.

 

However, if you would like to do any other processing apart from the 4 actions mentioned above you might take the help of scheduled apex. For eg: If you would like to create a new record at a particular time. 

 

The time setting on Time based workflows are limited to days and hours but i believe you can set the time till minutes and seconds on Scheduled Apex. However the actual execution depends on system availability.

 

That said, there is a limit on Scheduled Apex jobs - 100 at any time. So the general preference should be towards time based workflow if your requirements are fulfilled by workflows. If there are any bulk operations to be done say nightly updates etc, you use Scheduled Apex.

 

Hope this helps.

 

Regards,

Satish Kumar

 

 

 

Sumit jaitlySumit jaitly
Hi ,

Could you please let me know , how can we run a batch class which are containing callouts, on Scheduled Apex.
when i am running batch process on click event It is working fine but when i scheduled it the it is giving me error like 'callouts is not allowed at Scheduled Apex. '

Regards
Sumit