Shell script to schedule job without crontab

Опубликовано: 18 Июль 2026
на канале: Linuxanthus
13,940
67

Don't have access to crontab and at command? Try this shell script which will run the job at particular specified time in background.

difference=$(($(date -d "20:41" +%s) - $(date +%s)))

if [ $difference -lt 0 ]
then
sleep $((86400 + difference))
else
sleep $difference
#Write your command here
fi