![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cron not running | garric | UNIX for Advanced & Expert Users | 6 | 04-11-2008 08:32 AM |
| Cron not running .. please help | beisaikong | Shell Programming and Scripting | 2 | 07-12-2007 07:05 AM |
| cron job is not running | Suguna | UNIX for Advanced & Expert Users | 3 | 09-28-2006 09:11 AM |
| not running in cron | ajnabi | UNIX for Advanced & Expert Users | 4 | 07-11-2003 02:35 PM |
| Cron Sends mail to root on completion of job. | skotapal | UNIX for Dummies Questions & Answers | 1 | 04-25-2003 04:27 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
cron job not running to completion
am running a cron job to do a backup of all user files. the script runs properly in the terminal but only backups about 20% of the files when run by cron.
the Linux system is running BASH as far as I can tell. the symbols $FILE and $DIRECTORY are defined properly and the following is the active line which causes the backup to occur: NAME=userName; # DIRECTORY=~/$NAME; FILE=$DIRECTORY/`date '+%y%m%d%H%M%S'`_$NAME.tar; # tar -cvf $FILE $DIRECTORY/html; what do I need to do to get cron to create a tarball of all the files? |
|
||||
|
If you direct (as most people do) the stderr and stdout to /dev/null in the crontab file, remove this, then check your mail to see what, if any error you receive.
zum Beispiel: 0 0 * * * myJob > /dev/null 2>&1 (remove the "> /dev/null 2>&1" part) i.e. standard ourput and standard error goes to the mailbox of the owner of the job (unless you throw it away to /dev/null). This is usually a good place to look for why the job did not finish as you expected. --- by "check your mail" I mean (logged in as the user who starts the job) run "mail". You should see something like "cronjob .... produced the following output" (or some such) Last edited by scottn; 07-02-2009 at 06:52 PM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|