A job must run every 10 minutes, only on weekdays, between 09:00 and 18:00 IST, while servers run in UTC. Write the schedule.
BeginnerScenarioScenarios: text processing and scheduling decisions
Answer
Situation read → Express the time zone explicitly so it does not depend on the host setting.
What I'd do →
# systemd timer
[Timer]
OnCalendar=Mon..Fri *-*-* 09..17:00/10:00 Asia/Kolkata
# cronie (supports CRON_TZ)
CRON_TZ=Asia/Kolkata
*/10 9-17 * * 1-5 /opt/jobs/sync.sh
09..17with every 10 minutes ends at 17:50; add18:00separately if the last run must be at 18:00.- Verify:
systemd-analyze calendar --iterations=5 'Mon..Fri *-*-* 09..17:00/10:00 Asia/Kolkata'.
Why → Explicit time zones remove ambiguity, and validating the expression avoids surprises.
Interview tip → Mention that Debian's Vixie cron ignores CRON_TZ, so test which cron you have.
More on Scenarios: text processing and scheduling decisions
Users report errors in the last hour. From the Nginx access log, find which endpoints produce the most 5xx responses.BeginnerA MySQL slow log is 3 GB. You need the 10 slowest query patterns. What do you do?IntermediateTwo servers that should be identical behave differently. Compare their installed packages.BeginnerFind which pods were OOMKilled in a namespace, with their container names and restart counts.IntermediateProduce a CSV of running EC2 instances that are missing an `Owner` tag.IntermediateYou have access logs from five web servers and need one timeline sorted by time. How?Intermediate