OPNsense Forum

English Forums => Development and Code Review => Topic started by: SecAficionado on January 27, 2019, 11:30:10 pm

Title: [SOLVED] Help with Cron jobs sub menu
Post by: SecAficionado on January 27, 2019, 11:30:10 pm
Hi there,

I want to add an extra option to the list of commands in the cron jobs menu (System:Settings:Cron), but I need some help. I'll refer to paths in the Github pages (https://github.com/opnsense/core).

I think that the page is generated by the code in src/opnsense/mvc/app/[controllers|models|views]/OPNsense/Cron, but I can't figure out how the actual sub menu of commands is generated, so I can add the new task to be scheduled (pls see attachment).

I'm looking for it in an XML file, but I can't find it. My understanding of the process may be wrong. I'm just now dabbling into the GUI framework and structure.

Thanks in advance for your help!
Title: Re: Help with Cron jobs sub menu
Post by: franco on January 30, 2019, 12:55:47 pm
Wrong path... see https://docs.opnsense.org/development/backend/configd.html

Create an actions_myactions.conf file and in the action also add the "description:" tag. As soon as this is done you'll have the entry in the GUI after issuing:

# service configd restart


Cheers,
Franco

Title: Re: Help with Cron jobs sub menu
Post by: SecAficionado on February 01, 2019, 03:24:40 am
Thank you, that did it!
Title: Re: [SOLVED] Help with Cron jobs sub menu
Post by: franco on February 01, 2019, 09:33:50 am
Yay, no problem. :)