LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-15-2005, 05:50 PM   #1
schentor
Member
 
Registered: Jul 2005
Distribution: fedora, knoppix
Posts: 32

Rep: Reputation: 15
cron error: no job control


Hi,

I set up a Perl script to be run as a nightly cron job at 3:23 AM with the line
Code:
23 03 * * * * cd /backup1/backup_adm/; perl backup.pl
in my crontab file. The script creates a tar file in an NFS-mounted directory. Every night I receive an email saying:
Code:
/bin/sh: fg: no job control
Can't open perl script "backup.pl": No such file or directory
but I can successfully run the same series of commands manually, and backup.pl is definitely in /backup1/backup_adm. A monthly cron job belonging to the same user that FTPs data to a remote site also returns the same "no job control" error, but without the "no such file or directory" error.

How do I make these cron jobs run?

Thanks,
S. Chen
 
Old 07-15-2005, 11:31 PM   #2
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
I'd try creating a shell script to run your commands:
Code:
#!/bin/bash

cd cd /backup1/backup_adm
/usr/bin/perl ./backup.pl
Code:
23 03 * * * * /backup1/backup_adm/myScript.sh > /backup1/backup_adm/logs/backup.log
 
Old 07-18-2005, 01:39 PM   #3
schentor
Member
 
Registered: Jul 2005
Distribution: fedora, knoppix
Posts: 32

Original Poster
Rep: Reputation: 15
I wrote a shell script calling the Perl script and put it in my crontab file, and it worked. Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cron job wbatzle Linux - Newbie 2 07-12-2005 05:19 PM
"permission denied" error when cron job executes jillu Linux - Newbie 11 11-02-2004 02:19 PM
cron job the_rhino Linux - Newbie 10 10-02-2004 04:34 PM
cron job <defunct> error? existo Slackware 7 01-21-2004 04:39 PM
cron job ? johnyy Linux - Software 3 12-10-2003 07:00 PM


All times are GMT -5. The time now is 09:38 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration