cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Who Me Too'd this topic

Kron run only once at system-startup

j.schouwenburg
Level 1
Level 1

My problem: When a router with a cellulair interface or only the cellular card is replaced in the field this means restoring the saved configuration is not enough to get the box running again, first a few exec commands should be given.

With kron commands in the configuration it is possible to execute exec commands at certain moments or at a certain interval. I want to use this (or another method) to set the cellulair profile settings in the exec mode.

Since 12.4T the kron feauture is extended with the possibility to run on system startup, in addition to the recurring or oneshot occurrences.

Configuring the settings from kron works great, after a reboot of the box the settings are restored. But there is one problem. I only get it to work in a recurring kron schedule. This means that after a reload the commands are directly executed and then in every x minutes, days etc. I don't want this behaviour because this will lead to connectivity loss. The maximum intervall I can choose is 365 days which is far from infinite or never :-)

The manual tell's the format of the cron schedule command is:

kron occurrence occurrence-name [user username] {in [[numdays:] numhours:] nummin | at hours:min [[month] day-of-month] [day-of-week]} {oneshot | recurring | system-startup}

When using "at" the system startup option is not available, when using "in" the maximum time is only 365 days and i can not use a value of 0. Using oneshot will delete the schedule after once running, so next when a config is saved by someone the command is removed from the startup-config. So it seems there is no way to run a exec command only once at every startup with kron. So this is directly a feature request. Solutions: exept 0 for no repeating, except very high values above 365 days or except kron schedules without "in" or "at" (this should in fact already work as it is described in the release notes).

Last but not least, are there any other smart way's to set the cellular profile settings and keep these in the startup-configuration.

My routers don't support EEM, TCL is not handy because of the external storage (flash/tftp). Chat scripts don't seem to work as needed, it looks like executing the cellular profile commands do more than only the chat script commands. Are there any other tricks to solve this deadlock?

Best,

Janno Schouwenburg

Who Me Too'd this topic