Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 07-15-2005, 04:50 PM   #1
Registered: Jul 2005
Distribution: RHEL, Mint, Ubuntu
Posts: 32

Rep: Reputation: 15
cron error: no job control


I set up a Perl script to be run as a nightly cron job at 3:23 AM with the line
23 03 * * * * cd /backup1/backup_adm/; perl
in my crontab file. The script creates a tar file in an NFS-mounted directory. Every night I receive an email saying:
/bin/sh: fg: no job control
Can't open perl script "": No such file or directory
but I can successfully run the same series of commands manually, and 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?

S. Chen
Old 07-15-2005, 10:31 PM   #2
Senior Member
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:

cd cd /backup1/backup_adm
/usr/bin/perl ./
23 03 * * * * /backup1/backup_adm/ > /backup1/backup_adm/logs/backup.log
Old 07-18-2005, 12:39 PM   #3
Registered: Jul 2005
Distribution: RHEL, Mint, Ubuntu
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!


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 04:19 PM
"permission denied" error when cron job executes jillu Linux - Newbie 11 11-02-2004 01:19 PM
cron job the_rhino Linux - Newbie 10 10-02-2004 03:34 PM
cron job <defunct> error? existo Slackware 7 01-21-2004 03:39 PM
cron job ? johnyy Linux - Software 3 12-10-2003 06:00 PM

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

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