crontab command not working

Dear Friends,

I have tried to fire a job on daily basis through crontab command but it willn't work.
i have given in the following manner:
07 19 * * * exp /user_name/passwd/ file = /path/file-name full = N owner = user-name

but it is giving error that permission denied.
i have checked that the user is a member of group but still it is giving this error.
Anybody can give me a solution. please..
-Digant

Hi Digant,

Whether last argument is file? whether it has got many command line arguments? if yes plz specify it within quotes ( the sixth argument , starts from 3 *s)

I need some more inputs about this.

I'm on line u can ask me now
Thanks
Vasanth

Perhaps it should be username/password without the extra "/". More help is available if you do: exp HELP=Y

Hi Digant

pl check your command

exp /user_name/passwd/ file = /path/file-name full = N owner = user-name

is working on $ prompt

I consider that u are running exp of Oracle

I think also you need to set some env veriables.

Dear Dilip Patel,
yes, this is working on promt but it is not working while given by crontab command.Please if possible, give me solution. thanks in advance.
-Digant Dave

Dear Digant,

Pl do following

Create one script file. Also include your ORACLE_HOME and PATH settings like following

export ORACLE_HOME=your_oracle_home
export PATH=$ORACLE_HOME/bin:$PATH

exp /user_name/passwd/ file = /path/file-name full = N owner = user-name

check the script from $ prompt.

Now put the script with full path in the cron file.

Cheers

digant,

Usually when a script works from the command line and not from the cron, it is a problem with pathing or permissions....

As stated above make sure you set the proper varialbes and $PATH if needed...

Also, ensure the script and directories have the proper exe permissions.

Also, as recommended, put the command line not in the cron, but put it in a file and make it exe and put the path in the crontab.

I remember having a similar problem with a script ran out of cron - turned out because cron was run by root the script could no longer see the correct env.

The fix was to source .profile as the first line of the script, maybe you could check this out.

If you have some broken unix like some unixware releases make sure your cron file doesnt have any blank lines.

another 0.02$ but i'm betting it is because your oracle env variables are not set when cron is starting your job.