How to disable asynchronous jobs so that they cannot update data

I would do this with a hierarchy custom setting. Create a new setting object with a checkbox. Then, for each object you want to lock down, add a simple validation rule:

NOT($Setup.Lockdown__c.AllowUpdates__c)

Where Lockdown is the name of the custom setting, AllowUpdates is the name of the checkbox. Enable this checkbox at the org level until it's time to lock everything down.

Then, when the time comes, uncheck the box in the org defaults, and let your ETL run. This validation rule will block all attempts to update records, including any batches, scheduled updates, time-based workflow, etc. When you're done with the ETL, just check the box again, and you're good to go. This is the most efficient method I can think of, though other solutions would also be possible.


One way we are considering is deleting all the scheduled jobs before the 48 hour window and then recreating the scheduled jobs after the window.

If you are looking for a one-time activity, I will recommend you go with this approach of deleting the jobs and then rescheduling those after your ETL extract. This way you don't necessarily have to deal with any other tweaks but be able to assure that your data is not being updated by any source within the system. And because you have already ensured that no other Users can update any data, this will be your most direct way of achieving this.

Scheduled jobs are owned by an Integration User, is it a good idea to disable the Integration User ? Will we also need to abort currently running jobs ?

Even if you disable the User, there could be still a scheduled job and when it will execute, you end up with errors spending more time troubleshooting those. So yes, you will still need to abort currently scheduled/running jobs.


In all other cases, you will need to ensure to introduce some logic in your code/configuration and testing those out which potentially could take more time than going the direct way.