CLI-API V2: Return stdout output of cronjobs on successful execution
Currently, the API endpoint /api/v2/cli/scheduler/call only returns the execution status (e.g. "success" or "error") and the exit code. The actual stdout output of the cronjob, such as “123 images imported,” is not returned if the job completes successfully.
For monitoring, logging, or integration purposes, it would be very helpful if the standard output of the cronjob could also be returned — just as error messages are returned via stderr.
Proposal:
- The CLI-API should (if possible) return the stdout output of the executed cronjob.
- Alternatively, a flag could be added (e.g. return_stdout=true) to optionally include the output.
- The output could be captured via a temporary file and returned as part of the API response.
Use Cases:
- Automatically reading output such as import counters after cron execution
- Monitoring scheduled tasks through external systems
- Debugging recurring tasks
Thank you!
