You need to sign in to do that
Don't have an account?

Getting the number of queued batch jobs
We're only allowed to have 5 jobs in the queue for batch processing at a time. Ordinarily there's a method on the Limits class that allows us to get to info regarding limits, etc but I can't find one in this case. My money's on a bug in the documentation... Any help?
Current documentation: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_limits.htm
There is an object calles ApexAsyncJob. All the processing jobs will be there as records. You can query and check whether there are already jobs in queue using Status field of that object.
All Answers
There is an object calles ApexAsyncJob. All the processing jobs will be there as records. You can query and check whether there are already jobs in queue using Status field of that object.
Thanks sforce2009!
Any idea how to "wait" to add a job once the queue is open? I'm thinking something like saving the settings in a custom object, and having a scheduled apex job check the queue for openings, and add the custom object settings back into the batch method to queue up another batch job.