How to create a non recurring schedule
-
Hi,
I'm using pfSense version 2.8.1 and I'd like to schedule a rule on a NON recurring schedule, but only on a specific day.
For example I need to activate a rule for today with a specific time range.If I try to do this I notice that this schedule will be active every year on this specific day, and I don't need this.
This morning I find an active schedule that I configure one year ago.Thanks.
Best Regards,
Manuel -
@manuelf cron is not the tool for that, you can use the command
at(FreeBSD manual page: at) for runnig a job once.If you must use cron then one option is that the script you run once creates a file (e.g
/root/.my-job.ran, empty or not). And your script check if that file exists. And if yes, the script aborts. -
@manuelf said in How to create a non recurring schedule:
this schedule will be active every year on this specific day
That's an interesting callout, I hadn't realized. The way I'm using it (for my son), it's weekday ranges and we add exceptions. And I've been deleting those when I add another.
It's misleading if the "month" field shows a year ("December_25"). But you're right the range shows a month+day and the config file doesn't have a year. Apparently it requires manual deletion.
-
The docs actually say, "A schedule can apply to specific days, such as September 2, 2016..."
However if I choose a day in either this month or January 2026 it adds this without a year:
<timerange> <month>12</month> <day>25</day> <hour>3:00-23:59</hour> <rangedescr><![CDATA[test]]></rangedescr> </timerange>Am I missing something? If not I can create a redmine...
-
I went ahead and created https://redmine.pfsense.org/issues/16569.
-
It was closed already as "not a bug" [edit: because years are not supported] so I made https://redmine.pfsense.org/issues/16570 to change the docs.
-
Thanks, I understand that is not possible to configure a temporary schedule, but only recurring schedule.
Normally I need to enable, for a few hours or days, a remote access to our suppliers and for me is very useful an expire option of the rule like other firewall.
How can I set a temporary rule in pfSense?
-
-
Yes, I know, but the key point is the security, and for me is better avoid to remember to disable it.
Thanks you for your time.