Can anyone provide me when we can call an asynchronous apex from another specially between when they are not of same type like schedulable from future or batch from schedulable,etc


The usual reason for this is that you need more resources or additional limitations than you can use in the current context for whatever reason. For example, a Scheduleable class might call a Batchable class so it can process hundreds of thousands of records every hour, or you might call a Queueable from a Batchable class to avoid MIXED_DML_OPERATION errors. You should avoid doing so when possible, but it's important to know the technique, since you may eventually need to do so. I think the most common use case is Scheduleable to Batchable (repeat a large job on schedule), but any allowed combination typically has some rare, exotic use, which is why such allowances exist.


When we are planning to update setup and non-setup objects at a same time or single transaction via batch we will face mixed dml operation error, so this case we use to call batch inside batch(Calling Asynchronous from another Asynchronous)

Please let me know if you need any more example regarding this.

Not the answer you're looking for? Browse other questions tagged or ask your own question.