Salesforce Platform Developer I (legacy) — Question 275

A developer has a requirement to write Apex code to update a large number of account records on a nightly basis. The system administrator needs to be able to schedule the class to run after business hours on an as-needed basis.

Which class definition should be used to successfully implement this requirement?

Answer options

Correct answer: B

Explanation

The correct answer is B because the class only needs to implement the Schedulable interface to allow it to be scheduled for execution. Option A is incorrect as it includes an unnecessary Database.Batchable interface, while C has a typo in the class name, and D is inappropriate because the Queueable interface is not suitable for scheduled operations.