Save task batch to database