Currently, there is no way to retrieve schedules (cron expressions) using a REST API. We can use the Admin REST API /rest/admin/latest/scheduler/jobs endpoint to get the next scheduled run, but not the configuration.
- Expand the Admin API endpoint to add /rest/admin/latest/scheduler/jobs with the cron (or prettified cron) expression
- Add an expand parameter to include the cron
- Add cron expression to /rest/admin/latest/scheduler/jobs endpoint
The details can be retrieved from the database and filesystem. For example:
SQL queries below use PostgreSQL syntax. XML expressions may use different functions depending on the database type.
There are more queries to get specific trigger types linked to the following article. The article shows 5.x versions, but I can confirm that the queries work up to and including the current version (7.2.3).
The Expiry schedule is defined in the following file:
You can retrieve the cron schedule with the following:
The Branch Detection interval is also defined in administration.xml.
You can retrieve the interval, in seconds, with the following: