How to set a cron job to enable an access policy?

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
ryan256
DD-WRT Novice


Joined: 26 Apr 2013
Posts: 14

PostPosted: Tue Oct 15, 2024 21:38    Post subject: How to set a cron job to enable an access policy? Reply with quote
I have an access policy that I occasionally need to disable. But often forget to re-enable. How can I set a cron job that will re-enable it for me?

I found where to turn on cron under Administration -> Management. I also know the first part of the command since I want it to run at 2PM every day.

Code:
0 14 * * *


But I'm lost on what comes next. Do I reference the policy by its number or name?
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9336

PostPosted: Wed Oct 16, 2024 21:45    Post subject: Reply with quote
I assume you're creating and disabling these restrictions via the GUI. What makes you think/assume you can readily re-enable them via the CLI using a cronjob?

I could understand the question if you told me you were managing the entire process via the CLI, as the following user has done.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=329739

But even in his case, it's not clear what strategy/process is appropriate to initiate the rules, let alone make changes. But to the extent that can be determined, at least then I could understand your question about how to schedule THAT particular process (whatever it is).

I'm no expert w/ AR, so perhaps I'm missing something. But there just seems to be a disconnect here between working at the GUI level, then assuming there's some command that's going to re-enable your rule(s) via the CLI. If it's possible, it's likely going to be a bit more complex that a simple cronjob.

IOW, you have to define the "process" you're scheduling! AFAIK, it doesn't exist unless YOU make it so (just like the other user).

All things considered, it's probably just easier to ask Alexa or Siri to remind you to re-enable the restriction.

_________________
ddwrt-blacklist-domains.sh * ddwrt-dns-monitor.sh * ddwrt-ovpn-client-backup.sh * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh (UPDATED! 10/2/24) * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-server-watchdog.sh (UPDATED! 10/2/24) * ddwrt-ovpn-split-advanced.sh * ddwrt-ovpn-split-basic.sh * ddwrt-mount-usb-drives.sh * ddwrt-wol-port-forward.sh
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum