If you want the assignment to wait any specific amount of time in the Workbasket then configure SLA on the assignment and set the required time on the GOAL and configure ResumeFlow in the escalation activity by providing the proper parameters, once it reaches the GOAL time automatically the work object will be processed based on the parameters passed.
Method-1. You can call updateStatus activity to update the status of the activity and pxDeleteAssignmentsForWork activity to delete the assignment of that case. you can call this in a loop to do it for multiple cases.
Method-2. You can follow below steps for each case:
Enter case is in comma separated format(CSV).
Apply-Parse-Delimited method to split those case ids.
Call pxForceCaseClose pega API with each case id (or use a loop and call this activity for each case id).