Start and stop a process
A process is a named unit of work owned by one worker. Register one with your library, restart the application, and Core will discover it on the next heartbeat.
Spring Boot example
InvoicePoller.java
@SynapsysProcess(name = "invoice-poller")
public class InvoicePoller extends AbstractEndlessProcess {
@Override
protected void runForever(StopSignal stopSignal) throws Exception {
while (!stopSignal.isStopRequested()) {
System.out.println("checking for invoices");
Thread.sleep(5_000);
}
}
}
Node.js example
Add this registration before synapsys.start():
synapsys.endless('invoice-poller', async (stop) => {
while (!stop.requested) {
console.log('checking for invoices');
await stop.sleep('5s');
}
});
Drive it from the console
- Open Processes and select
invoice-poller. - Choose Start. The command is delivered on the next heartbeat.
- Watch the state move from
idletorunning. - Open Executions, select the run, and open its logs.
- Choose Stop. The worker receives a cooperative stop signal and reports
idleafter the process exits.
The console navigation and entity cards adapt to mobile screens. On a phone, open the navigation drawer to move between Workers, Processes, Executions, Actions, and Settings; the same start, stop, and log views remain available.
If a process stays in stopping, its body is not cooperating with cancellation.
Use the library-specific guides for the correct pattern: