CRON job not running on Plesk / Passenger hosting

The construction of the route, controller is fairly straight forward (we have some examples in the documentation) but I have a very poor example in one of my hobby projects.

This is simply put, a route that will bulk delete entries older than x months old that I run on a cron (protected by the users-permissions plugin and locked to an automation user). FYI my code is horrible but this was a quick and dirty solution.

Controller:

Route:

The actual cron part is built into my horribly designed cron system (this could be much much simpler but I’m running quite a few cron scripts with complex logging needs, and a custom tailor made “SDK”)

The actual function making the request to Strapi:

And a small screenshot of that script running:

This is just simply running node-cron as a PM2 service that has a set crontab schedule to run every 4 hours, it calls the Strapi REST endpoint which fires off the bulk delete through a RAW Knex query (to keep it simple). Im doing some basic SQL injection validation, but realistically that isn’t terribly critical since that route is locked down to a specific automation role that is only used for cron-scripts. You could just as easily use our API Token guide instead to handle it with a preshared key/token: