Using a mirrored SQL database environment that will not permit any local SQL agents to run jobs locally on the SQL Servers.
If the copyfromstaging job runs on the secondary (mirrored) SQL instance they'll see a bunch of errors in the logs since the secondary database is not in write mode.
They would like to request that this change in the code, to test for the existence of the primary replica before running the SQL Agent job(s) be added to the code permanently.
The below was provided to test with and is what they would like added:
If (sys.fn_hadr_is_primary_replica (db_name()) = 1)
select 'Not the primary replica'