#!/bin/sh # delay - take a timezone and a program and arguments, then submit an # 'at' job for that program to be executed at the same time in the # given timezone. I.e. it delays that program's execution until that # time somewhere else. timezone=$1 shift curdate=`date +'%Y-%m-%d %H:%M:%S'` tgtdate=`date --date "TZ=\"$timezone\" $curdate" +'%H:%M %Y-%m-%d'` #echo "Date now = $curdate" #echo "Target date = $tgtdate" echo $* | at "$tgtdate"