I would like to automate cronjob (meaning schedule a job to be done from a shell script). So i have script that does this
#!/bin/ksh
timestamp=$(date +%H%M%S)
if [ "$timestamp" -eq 230000 ]; then
write to cronjob to execute the same script @ 11:00 PM
fi
so the output should be like below, is this possible?
00 23 2 10 2 /home/test/run_cron.sh
Best Answer
I assume you only want to be added to
crontab
ONCE. Therefore one must remove the script from thecrontab
first: