[Feature Request]

Started by dcol, August 17, 2021, 12:46:05 AM

Previous topic - Next topic
Didn't see anywhere in the forums for feature requests. Which can be another feature request

I would like to be able to add a custom Cron job in the WebGUI. Just a simple run this command on this schedule. Maybe it's already there. I couldn't find it.

You can't add a custom cron command via the GUI but you can do it via CLI and have it appear in the GUI as an option to schedule in a cron job: http://kb.unixservertech.com/other/networking/opnsense/cron-jobs

I saw that and tried, but does not work for me. Not sure what to put in the action file. When I copied it using my file, it didn't work and the configctl showed no action found. I did the service reset and saw the Cron job in the list but it never executes. I set the permissions on the file. Would be so much easier just to have a custom entry on the Cron screen in the GUI

August 17, 2021, 04:15:57 AM #3 Last Edit: August 17, 2021, 04:17:51 AM by Greelan
You might find the examples here helpful: https://forum.opnsense.org/index.php?topic=18865.msg86224#msg86224

Quote from: dcol on August 17, 2021, 02:04:19 AM
I saw that and tried, but does not work for me. Not sure what to put in the action file. When I copied it using my file, it didn't work and the configctl showed no action found. I did the service reset and saw the Cron job in the list but it never executes. I set the permissions on the file. Would be so much easier just to have a custom entry on the Cron screen in the GUI
That link seems to have what you need. I think you have an APU too. Shout if you want a hand with that. I can test it for you on mine.
P.s. there are two files. One with the actions and the other with the setup for the GUI

 Very similar to the script I was using. I will try that script tonight.
So what would the configctl test be with this script?
Thanks

It is a simple service configuration without full service actions, I.e. no functions.
I've just tested the line doing the business and does what it needs to do for an external check.

August 18, 2021, 11:10:40 PM #7 Last Edit: August 18, 2021, 11:14:38 PM by dcol
I installed the cron job. I do see it run in the backend logs every 10 minutes and returning exit status 126, whatever that implies. I assume it is working. I do not see any console messages as the script implies.

My Bad. Forgot to set permissions on ping_check.sh. Getting broadcast message now. Thanks