Custom Views Bulk Operation using Batch API
Go to VBO settings (when editing the view, next to Style: Views Bulk Operations) and for your operation select the "Use Batch API" radio button under "To execute operations".