Yes — exactly one mandatory method:
public void execute(SchedulableContext ctx);
That’s the entire Schedulable interface. If you implement Schedulable without providing this method (or with the wrong signature), the class won’t compile.
The exact signature
| Element | Requirement |
|---|---|
| Visibility | public (or global for managed packages) |
| Return type | void |
| Method name | execute |
| Parameter | Exactly one: SchedulableContext ctx |
| Static? | No — instance method |
Any deviation and the compiler rejects the class as not implementing Schedulable.
Why only one method?
Schedulable is intentionally minimal. The schedule itself (cron expression, name, frequency) is configured outside the class via System.schedule. The class only needs to know what to do when fired — that’s execute.
What you’d write
public class WeeklyReportSender implements Schedulable {
public void execute(SchedulableContext ctx) {
// ... your scheduled logic
}
}
Then somewhere (anonymous Apex, setup script, deployment hook):
System.schedule(
'Weekly Sales Report',
'0 0 8 ? * MON', // Monday 8 AM
new WeeklyReportSender()
);
Inside execute — what’s typical
Most production execute methods do one of three things:
1. Kick off a Batch job
public void execute(SchedulableContext ctx) {
Database.executeBatch(new MyBatch(), 200);
}
2. Enqueue a Queueable
public void execute(SchedulableContext ctx) {
System.enqueueJob(new MyQueueable());
}
3. Do the work directly (small jobs)
public void execute(SchedulableContext ctx) {
List<Lead> leads = [SELECT Id FROM Lead WHERE Score__c > 80 LIMIT 100];
// ... process inline
}
For anything heavy, use option 1 or 2 — Scheduled Apex execute has the standard governor limits and isn’t optimized for huge workloads.
What execute is not allowed to do directly
- No HTTP callouts. Scheduled Apex doesn’t support direct callouts. Use Queueable (
Database.AllowsCallouts) called fromexecute. - No future calls — well, actually you can.
@futurefrom Scheduled is allowed (Scheduled is treated as sync for this rule). But best practice is to use Queueable.
Common interview follow-ups
- Can I have multiple
executemethods? — In the same class, yes, if they have different parameter types (execute(SchedulableContext)plusexecute(Database.BatchableContext, scope)for a combined Schedulable+Batchable class). - Can
executethrow an exception? — Yes — it surfaces in the CronTrigger as a failure and is emailed to apex exception recipients. - Why is the parameter required if I don’t use it? — Interface contract. You can ignore the parameter, but you must accept it.
Verified against: Apex Developer Guide — Schedulable Interface. Last reviewed 2026-05-17.