What I want to achieve is to change lock screen, regularly. As an example, the lock screen is a PIN, and the PIN number should be increased by one everyday (e.g., using cron jobs).
It seems there is no such an app on Google Play Store, as it is a special task (if it is, please send the link here). The next method would be using Terminal. My phone is rooted with Termux installed.
Now, the questions are:
How to change the lock screen from Terminal?
How to set the screen lock type? For example, you would say the screen lock should be changed from a PIN to pattern. Consider the special cases such as pattern, please (if they are possible or not).
Note: The reasons of doing such a thing is just personally-preferred, so, asking the benefits of doing so seems useless. Someone else might want to change it just for the fun.
locksettings is added in Android Oreo, as mentioned by @IrfanLatif and this answer. As a result, it seems I am out of luck, becuase my Android version is before Oreo (i.e. Android 7.1.2).