Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Crontab runs my script but file that are fetched are of 0 kb and when i am running my script scheduled by own i.e ./ $1 $2

its running and files are also fetched Please suggest me why this is hapeening...

share|improve this question
It's probably something on line 13. – Ed Manet Nov 18 '12 at 5:26

Usually when a script runs properly if run manually, but fails when run from cron by the same user, the problem is a full path not being specified in the script. Your PATH variable for an interactive login session is MUCH bigger than the one your cron job is running under; so where, for example, rsync $source $target might work fine from the command line, when run from cron you should specify the full path: /usr/bin/rsync $source $target instead.

If this isn't helpful, please post back with more detail about what your script is actually doing, and what specific results you're getting.

share|improve this answer
Hi,m geeting wht u wnt to say but i have already specified full path in crontab: eg. /user/bin/ abc .Actually in my script inside for loop for every node process of fetching data is running in Bg, but wen it running as cronjob it capturing 0 kb file but wen m running as ./ abs it running fy9..m usuing /Ksh shell in script...pls help me out – user108904 Nov 19 '12 at 4:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.