Computing.Net > Forums > Linux > Crontab Doesnt Work

Crontab Doesnt Work

Reply to Message Icon

Original Message
Name: shaheem
Date: June 16, 2008 at 21:43:18 Pacific
Subject: Crontab Doesnt Work
OS: Linux
CPU/Ram: centrino 1 gb
Comment:

I have a cronjob that fails to exec for the time set although the job works manually. the script is named expfull and is used to export the oracle DB ,zip it in the server in daywisefolders,then copy it into a client machine ..when i issue ..SH EXPFULL .. the copy reaches the client..but the cronhjob i set for executing expfull fails.Help...

Shaheem


Report Offensive Message For Removal

Response Number 1
Name: nails
Date: June 17, 2008 at 08:15:52 Pacific
Subject: Crontab Doesnt Work
Reply: (edit)

Typically, when a job executes correctly from the command line and not from cron, it's because cron's environment isn't the same as the user executing the job.

In the script, make sure the shell invocation:

#!/bin/bash

exists on line 1.

Make sure all relevant shell variables are defined in the script. The one that trips up most folks is PATH, but I'd also define the variables required for Oracle.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Crontab Doesnt Work

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software