I have a class which is scheduled on daily basis.This class will check a date field(contract date) in all opportunities and if this date is today, it will update a checkbox field in all those opportunities.
Now this checkbox field will fire a trigger which will clone the same opportunity and all its child opportunities.
Now, say i have 10 opps for which this scheduled class is executing and for each of these opps more than 30 child opps are there which will also get cloned from trigger.
Now, this job is not working in prod showing as Apex cpu time limit exceeded.
Please suggest which approach should i follow for this scennario.
1 answer
Hi Kamesh,