function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
code developercode developer 

Getting Organisation Administration locked Error

Hi,

 

I am getting this error Getting Organisation Administration locked Error  even there were no schedulable jobs or batch jobs or test classes in queue or running. I have tried the following :

 

 

List<AsyncApexJob> ctList = [Select a.Status From AsyncApexJob a where status!='Completed' ];
for(AsyncApexJob ct : ctlist){
system.abortjob(ct.id);
}

 

 

List<ApexTestQueueItem> items = [Select Id,ApexClassId,Status,ExtendedStatus,ParentJobId from ApexTestQueueItem where Status != 'Completed'];
for(ApexTestQueueItem atqi : items) {
atqi.Status = 'ABORTED';
}
update items;

 

 

 

List<CronTrigger> ctList = [Select c.State, c.Id From CronTrigger c where state!='COMPLETE' limit 50000];
for(CronTrigger ct : ctlist){
system.abortjob(ct.id);
}

 

 

But I didnt find any change. Please help me out.

 

Thanks

 

Jeff MayJeff May

This can happen when a code deploy gets interrupted in the middle. The server side has to finish timing out before the transaction is unlocked.  It will fix itself.