Linux cron does not start the sh file

177 views Asked by At

I want to know this setup is enough to start some program(.sh) file in cron setting.

//crontab -e

* * * * * /home/start/bat_start.sh

if I just type /home/start/bat_start.sh in command prompt it work. and also I checked log file and it seemed working

Sep 19 09:35:01 localhost CROND[21784]: (ammt) CMD (/home/start/bat_start.sh)
Sep 19 09:36:01 localhost CROND[21796]: (ammt) CMD (/home/start/bat_start.sh)
Sep 19 09:37:01 localhost CROND[21807]: (ammt) CMD (/home/start/bat_start.sh)
Sep 19 09:38:01 localhost CROND[21818]: (ammt) CMD (/home/start/bat_start.sh)
Sep 19 09:39:01 localhost CROND[21829]: (ammt) CMD (/home/start/bat_start.sh)

each part seemed working but whole thing is not working together
is it right to set up the crontab?

1

There are 1 answers

0
abhishek phukan On

could you please elaborate. That is the correct way to set up a cron. Below is a link if you would like to read further on how to set up a cronjob

https://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/