Trigger magnolia cms commands

This script triggers a specific command in magnolia cms. You can combine this with publishing commands.

cm = info.magnolia.commands.CommandsManager.getInstance()
command = cm.getCommand('commandCatalog', 'commandName')
command.execute(ctx)