Portainer has a cron job scheduler, per this github post. It looks like it lets you run Docker commands similar to those found in this Stack.
I'd like to keep the latest image and three of the newest images, but delete anything older. This way I can still revert to an older version if I need/want to. Even if, I don't happen to use or check every image in Portainer frequently.
Is there a way to do this with Portainer's Scheduler?