I have a shell script that runs via crontab, but the commands in it are timezone dependent (they refresh a table in database everyday. If the script runs during the time of a DST change, it will replicate inconsistent period of data.
I am planning to use a wrapper script that:
- Checks if timezone between today and tomorrow is different
- runs the child script only if first check returns false (its not different)
There's plenty of informatin on changing the timezone, but nothing on checking if the timezone changed in linux/bash.