Answers for "crontab command not found"

1

crontab command not found

## Cron often clears the whole $PATH environment
## So the shell doesn't know where to look for the command

## You should set the $PATH enviorment in crontab:
PATH="/usr/local/bin:/usr/bin:/bin"
0 1 * * * db2 connect to myDB2

## Or add the $PATH enviorment in your script:
#!/bin/bash
PATH="/usr/local/bin:/usr/bin:/bin"

# rest of script follows
Posted by: Guest on February-15-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language