Problem:I am trying to design a system which takes requests from customers inreal time and log them in a database. For example - request topurchase an item.The customer then gets a unique request-ids for his request and alsois asked to wait for 'X' days because the request is being processed.Then the system notifies the item providers by batching all theserequests in one single email periodically (lets say 4 hours).Item providers update items in their repository and publish them tocustomers.  And then customer gets a notification that item providershave responded for his request.Design:I'm thinking of using a workflow based system for this use case. With  following components (high level) -Synchronous API: - Receive request from customer.  - Record the request in the database. - Also start an asynchronous workflow, return request id as a response.Workflow does the following :Workflow Step 1: - Get the list of item providers - Notify themWorkflow Step 2: (This workflow steps gets executed after X days) - Send a response email back to the customerBut I'm having hard time to support the batching use-case. Is there  any way I can efficiently batch the customer requests and send  notification every 4 hours without having to write a cron job  separately?I'd appreciate any suggestions/help on this. 
Design periodic batch notification system
design;architecture;performance;scalability