Background jobs
Neptune DXP provides you with the capability to execute one or more server scripts on a scheduled basis by defining background jobs. A background job can have one or more steps with each step executing a server script. If a step fails, you can branch on to the next step or to a specified step (for example, a step dedicated to error processing). Jobs can be executed immediately upon creation or periodically by setting start/end dates along with an interval level between executions measured in days, minutes, hours, or seconds.
Typical use cases include:
-
Out of peak hours processing for CPU/Memory or I/O intensive tasks.
-
Batch event publications: Each time an API request is made to create/update or delete a resource entry is also recorded and posted to a queue; every 1 second a Neptune DXP job may be executed to flush the journals queue to produce an asynchronous event message per journal entry.
-
Housekeeping: To wipe journals, for example, every 24 hours at 2 am, clear logs held in the microservice private data after marked as siphoned out to a central logging system, temporary data, etc.