1

Since there can be problems with the time change from summer/winter or winter/summer, I wanted to ask how I could solve the problem within the bash script-2?

I think in the winter time it should not come normally to problems since CRON acts here smartly and does not execute CRONS twice, nevertheless I would be grateful here for tips how I could configure the best in both time changes.

SUMMER-TIME-CHANGE-GERMANY (RUN AT SAME TIME)
2h - CRONTAB -> Bash-Script 1
3h - CRONTAB -> Bash-Script 2

WINTER-TIME-CHANGE-GERMANY (SHOULD NOT BE A PROBLEM?!) 2h - CRONTAB -> Bash-Script 1 3h - CRONTAB -> Bash-Script 2

Omexlu
  • 143
  • 1
  • 10

1 Answers1

1

One approach:

Have the system clock or at least cron run at UTC. UTC has no daylight savings time and you won’t have any issues.

(And like many utilities and tools allow : only convert from UTC to the time zone most relevant to a person in the presentation layer.)

A second consideration:

Cron is a time based scheduler. If you have real job dependencies you can’t really rely on cron to ensure they are met. If batch job B must always start after job A ; simply use a single batch job (with some more error checking and handling )

#!/bin/sh
/do/job-A
/do/job-B 
Bob
  • 6,366