Dsh command : Execution Problems with Cron

Hi,

On linux cluster, i created a script to delete all temp files older than 5 days.

i am able to execute the script "dsh -ea script.ksh" in management node directly
But when i schedule "dsh -ea script.ksh" in crontab in management node it tells dsh command not found.

How to solve this issue?

error :

/root/tmpdeletion_adm.ksh: line 2: dsh: command not found

That's a very common problem - when issuing a script via cron, you don't have the environment set like when being logged in with your user. Variables like PATH might be empty or set different. So you will have to use absolute paths or source environment files etc., up to you.
Here is a link to an detailed explanation about using cron:

Hi zaxxon,

Thanks.i have used

entire/path/dsh -ea script.ksh

and it works fine.

in crontab :slight_smile: