I have written a script to execute some sql statement via executable file.
It is working fine via command line, however when I schedule it in cron.
The executable file is looking for library file in its root directory.
Wonder where does cron run the script from, and can we get the script to get the "jobs" run in a directory that we define. Thanks.
I've tried below and is still failing
* * * * * cd /path/execdir && /path/execdir/script.sh
I even put the path in the script, but still it is not working.
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/o/b/utility/bin