LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-25-2015, 06:02 PM   #1
naflan
Member
 
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94

Rep: Reputation: 15
Question crontab error


When my crontab job runs a script, text is appended to the script file after the job is complete. I then delete the appended text but it is added to the script file the next time the cron job runs. This is the appended text:

Code:
From naf Wed Mar 25 18:47:01 2015
Date:  Wed, 25 Mar 2015 18:47:01 -0400
To:  scripts, backup
User-Agent:  Heirllom mailx 12.5 7/5/10
MIME-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  quoted-printable
the "To" recipients are the names of the only 2 folders I have in my home directory.
I'm using postfix

This is the crontab:

Code:
47 18 * * * * /home/naf/scripts/backup_databases.sh
So the above text is appended to the file backup_databases.sh

Any idea what is going on?

Thanks,
Nick
 
Old 03-26-2015, 04:42 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
We can't comment on this without seeing the script - I imagine it contains something funny.
 
Old 03-26-2015, 04:49 PM   #3
naflan
Member
 
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94

Original Poster
Rep: Reputation: 15
Code:
#!/bin/bash
echo "backup all databases..."
mysqldump -u ### -p##### -A --add-drop-table > /path/to/bd_backup.sql
also a python script that I have been using for years has the same problem in crontab. I have had this problem since a clean install of slackware 14.0.
Used these same scripts in crontab in slackware 13.0

Last edited by naflan; 03-26-2015 at 04:50 PM.
 
Old 03-29-2015, 09:24 AM   #4
naflan
Member
 
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94

Original Poster
Rep: Reputation: 15
could this be a mail configuration problem? or cron problem?
 
  


Reply

Tags
crontab, mailx, postfix



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab Error ignignokt Solaris / OpenSolaris 1 09-25-2006 02:00 PM
crontab error on hours richikiki Linux - Newbie 2 07-16-2006 11:29 AM
Crontab Error Drunkalot Linux - General 7 07-07-2005 09:34 AM
error running script on crontab haora Linux - Newbie 3 03-11-2005 04:02 PM
Help with crontab log error magyartoth Linux - General 5 12-21-2004 01:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration