OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: DrDeed on October 15, 2021, 08:41:17 PM

Title: How to Operate Cron Commands from Settings?
Post by: DrDeed on October 15, 2021, 08:41:17 PM
Hey so I want to occasionally reset an interface based on internet availability or not, I'll likely end up having to setup a custom script but before that I noticed a "Periodic Interface Reset" command under the default Settings-Cron. My question is where would I go to see exactly what that does, and what parameters it might accept?
Title: Re: How to Operate Cron Commands from Settings?
Post by: DrDeed on October 15, 2021, 10:00:18 PM
I noticed this:
https://githubmemory.com/repo/opnsense/docs/issues/282

Also as referenced in that article this:
https://github.com/opnsense/core/blob/6cc719a50761cf4e419abe7b94fd0d513b2346b4/src/opnsense/service/conf/actions.d/actions_interface.conf#L1-L6
Title: Re: How to Operate Cron Commands from Settings?
Post by: Fright on October 16, 2021, 07:24:16 AM
hi.
interface_configure function will be called.
https://github.com/opnsense/core/blob/13767617b603e41d8ad568394e44d7482a7b03da/src/etc/inc/interfaces.inc#L2319

parameter - interface name ('wan' by default)