Make entries in crontab file

I have created a shell script "abcd.sh" and script should run after every 10 min., For that I will create below entry in the crontab file by using command crontab -e

*/10 * * * * /cdr/work/proc_raw/abcd.sh >> /dev/null 2>&1

I wish to know whether above entry is correct or I have to make entry as:

*/10 * * * * /cdr/work/proc_raw/sh abcd.sh >> /dev/null 2>&1

I have to deploy script in production and no test environment is available so I wish to clear my doubt before deployment.

Operating System: HP Linux
Shell: bash

when I run the shell script in command prompt, I have to run the script as sh abcd.sh
If I run the script as in command prompt as abcd.sh, it throws error as
bash: abcd.sh: command not found

have you added the first line to tell which shell you are running? like

#!/bin/sh
1 Like

The first crontab line on post #1 is the correct one.

Make sure that the script is executable.
Make sure that the script has shebang line (like in post #2) pointing to the absolute path of bash or sh (depending on which is appropriate). In your intro you refer to bash, but in the example to sh. Maybe they are actually the same Shell on your computer?

That is just because the directory containing the script is not in $PATH .
What is important is whether it runs as:

/cdr/work/proc_raw/abcd.sh