I want to implement a cron job on ubuntu to run a sh file. In that sh file I have written a command which is having some purpose. To implement it I executed the below commands:

  1. whereis sh

it will show me the sh: /bin/sh.distrib /bin/sh /usr/share/man/man1/sh.1.gz

To implement the cron job then I execute:

  1. crontab -e

Which will result open a file in nano editor.

  1. Then there I place a command like 1 * * * * /bin/sh /home/iron/go/src/saleshangry/sh/test.sh

After save this it will show me crontab: installing new crontab

After that there is no response by this cron. in the sh file I call an api of golang which will save the record in the database mongodb. When I hit /bin/sh.distrib /bin/sh /usr/share/man/man1/sh.1.gz this command in terminal it works fine but crontab is not working. What is the thing that I'm missing? Can anyone please tell me?

0 Answers