Line 109: |
Line 109: |
| ** since weekdays shift throughout the year, i.e., they are not dependent on specific days of a month, so when they are used with crontab in conjunction, the action will be executed when the current time matches the value in either field. For instance, '''5 5 5 * 5''' would cause the specified command to be executed at 5:05 AM every fifth day of every month plus every Friday. | | ** since weekdays shift throughout the year, i.e., they are not dependent on specific days of a month, so when they are used with crontab in conjunction, the action will be executed when the current time matches the value in either field. For instance, '''5 5 5 * 5''' would cause the specified command to be executed at 5:05 AM every fifth day of every month plus every Friday. |
| | | |
− | ==Example== | + | ==Examples== |
| | | |
| This section will provide some crontab usage examples in the hopes of helping you getting the hang of the system or even finding one that you could use. | | This section will provide some crontab usage examples in the hopes of helping you getting the hang of the system or even finding one that you could use. |
Line 115: |
Line 115: |
| ===Periodic SIM switch=== | | ===Periodic SIM switch=== |
| ---- | | ---- |
| + | For this example we'll configure a rule that initiates a SIM switch every weekday at 6:45 PM. To execute a SIM card switch via CLI the command '''sim_switch''' is used, so we'll combined this with the crontab and configure the rule: |
| + | |
| + | # 45 18 * * 1-5 sim_switch change |
| + | |
| + | Let's overview what each segment indicates: |
| + | * 45 - the action must take place at minute 45 |
| + | * 18 - the action must take place at 6 PM |
| + | * 2x(*) - all months and days of the month are applicable to the rule |
| + | * 1-5 - the action must take place every Monday - Friday |
| + | * sim_switch - the command that will be executed |
| + | * change - option for the sim_switch command |
| + | |
| + | To sum up, the first five segments denote the frequency of the sim_switch command. The option '''change''' specifies that the SIM card that is currently in use will be switched. So the entire entry will perform a SIM switch to the opposite SIM card every weekday at 6:45 PM. |
| | | |
| ==External links== | | ==External links== |
| | | |
| https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html - PuTTY downloads page link | | https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html - PuTTY downloads page link |