ApexSensei

Drills Asynchronous Apex

Schedule an Account review

Schedulable Apex runs execute at times set by a cron string.

Your task

Complete the scheduler so schedule registers the job with cron 0 0 0 1 1 ? 2099, and execute later labels only the selected Accounts.

public class AS_7F17D42757F6_ScheduledAccountJob implements Schedulable {
    private Set<Id> accountIds;
    private String reviewLabel;

    public AS_7F17D42757F6_ScheduledAccountJob(Set<Id> accountIds, String reviewLabel) {
        this.accountIds = accountIds;
        this.reviewLabel = reviewLabel;
    }

    public void execute(SchedulableContext context) {
    }

    public static Id schedule(Set<Id> accountIds, String reviewLabel, String jobName) {
        return null;
    }
}

Requirements

  1. registersExpectedCron should pass
  2. waitsUntilTheJobRuns should pass
  3. updatesEverySelectedAccount should pass
  4. carriesScheduledLabel should pass
  5. leavesUnselectedAccountAlone should pass
  6. schedulesAnEmptyIdSet should pass
  7. updatesTwoHundredAtOnce should pass

Sign in to open this drill