Permissions to trigger script remotely?

I’m in need of a cron job on a server to make changes to the router. The server is located in a none-secure zone, hence I don’t want to give it full admin permission. I want it to trigger the script to change the router firewall config as needed to do some other tasks in that cron job, then, when it’s done, revert the changes by either trigger another script on the router, or make use of safe-mode by just disconnecting. Is there any way to permit a user access to run the script on the router, and deny anything else?