Schedule command execution

Hi!

GeoIP filtering is added to 1.4 rolling.
An update of the GeoIP database can be triggered via OP mode command “update geoip”.

What would be the best way of scheduling that command (or any OP mode command)?
Via a script? Command Scripting
Or is there a way to schedule the command through the configuration? (like squidguard URL filtering update: Webproxy set service webproxy url-filtering squidguard auto-update update-hour 23)

Thanks in advance!

hi @Diekos , maybe you can try Task Scheduler — VyOS 1.4.x (sagitta) documentation for that purposes

Hi,

Thank you for your quick reply!
I also read that document, but it needs a path.
Does that mean that I still need to create a script for executing that command, or can I define that command as the path?

Hi @Diekos. Exactly, you have to create script with commands, and beter to store it in /config/scripts/ directory. This will guarantee that script will copied after update VyOS version.

How to use scripting in VyOS try to get with Command Scripting — VyOS 1.4.x (sagitta) documentation

1 Like

Hi,

Thank you for the detailed answer, I will try that out!

You don’t need to schedule it, a timer is included to keep the database up to date with monthly updates.

1 Like

Thanks for the answer!
Can that timer be variable? To run it daily or weekly instead of monthly?
I don’t know how fast changes will come to such geoip databases but I think I read somewhere that those databases could change a lot in a short period of time.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.