Is there a way to pass a parameter into a schedulable class execute method? We were trying to pass a string from another scheduled class into this scheduled class but it looks like we can't do that?
As quick context we have the scheduled date and time as a record in a custom object so we are trying to pass that info into our scheduled class.
global class MturkVSSchedule implements Schedulable{
global void execute(SchedulableContext SC, **String s**){
Putting String S throws a compile error.
Is there a different way that I'm missing?
Best Answer
What about passing parameters through constructor and storing them in instance variables?
And whenever you need to pass parameters you can do the following:
Please mark this answer as accepted or vote up if you agree that it answers your question.