adspace


Write a syntax and structure of scheduler class?

Answer Posted / Deepak Kumar Pathak

A Scheduler Class in Salesforce is defined by extending the `Schedulable` interface. Here's an example structure for a simple scheduler class that executes a method every hour:n```npublic class MyScheduler implements Schedulable {n public void execute(SchedulableContext SC) {n // Your custom logic goes heren }n}n```nThen, create a Cron expression to schedule the execution of your scheduler class through Setup -> Apex Classes & Objects -> Schedules.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What were you doing before sfdc development?

522


What is workflow rule and workflow actions? : salesforce workflows and approval process

574