How to check Async Apex Usage in Salesforce?

How to check Async Apex Usage in Salesforce?

DailyAsyncApexExecutions Limit from System.OrgLimit can be used to check Async Apex Usage in Salesforce.

Sample Code:

Map < String,System.OrgLimit > limitsMap = OrgLimits.getMap();  
System.OrgLimit objAsyncLimit = limitsMap.get( 
	'DailyAsyncApexExecutions' 
);  
System.debug( 
	'Limit Name: ' + 
	objAsyncLimit.getName() 
);  
System.debug( 
	'Usage Value: ' + 
	objAsyncLimit.getValue() 
);  
System.debug( 
	'Maximum Limit: ' + 
	objAsyncLimit.getLimit() 
);  

Output:

DailyAsyncApexExecutions Limit from System.OrgLimit can be used to monitor the Async Apex Usage in Salesforce. So, use the above code as reference.

Leave a Reply