You need to sign in to do that
Don't have an account?

How to call a Schedulable Class from Trigger?
Dear All,
I have Batch apex Class and Schedulable class. I am looking for the syntax to call the Batch apex class from the trigger or calling the schedulale class from Trigger, which inturn calls the Batch apex.
Thanks in Advance!
The syntax for launching a Batch Apex job from a Trigger is the same as launching it from anywhere else in Apex.
Here's the syntax for launching your Scheduled Class, assuming it has a constructor:
I would be very careful, though, about launching your scheduled Job from a trigger, as you NEED, NEED to check to make sure that you have available Scheduled Jobs --- you can only have 10 Scheduled Jobs at a given time. Use something like this to check to make sure you have enough Jobs:
As far as launching Batch Apex jobs, I usually have a utility method in my Batch classes that makes it easy to launch a new Batch Job, i.e.