Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by askubuntu.com #
 
PREVIOUS NEXT
Tagged: #crontab #command
ADD COMMENT
Topic
Name
4+5 =