Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Programming & Scripting
Reload this Page Cronjob problem
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Programming & Scripting C, Perl, PHP, Bash Scripts, anything programming or script related post in here!

Reply
 
Thread Tools Display Modes
Old 12-20-2007   #1 (permalink)
Just Joined!
 
Join Date: Jun 2007
Posts: 10
Cronjob problem

Guys,

please help me fix this problem. Its kind of urgent..I sat on it for more than 2 days. But im totally lost. Its a pretty dumb problem actually.

Im trying to run a crontask on a remote system. I should execute a shell script at a given time.

For ex: * * * * * bash /Users/name/sample.sh

In the script ive included commands to perform database backup. It works fine. But the problem is that, ive to run a perl script prior to the execute of mysqldump. For some dumb reason, it wouldnt execute.
Details of the file sample.sh:

/usr/bin/perl /Users/name/chumma.pl

If i run this command it should update some tables in my local database. Then i should run mysqldump to import it to a remote database, which works fine.

I dont know why the crontask wouldnt execute. I dont know if there is a problem with the shell syntax or the perl syntax.

Please not that, i SSH into a remote system to run the cronjob..
thelevitator is offline   Reply With Quote
Old 12-22-2007   #2 (permalink)
scm
Linux Engineer
 
Join Date: Feb 2005
Posts: 1,003
You might need to use a fully qualified path to bash - /bin/bash.

If that's not enough, check the mailbox of the user running the cronjob to see if there are any hints in there as to why it's failing. It might help to see the perl script - does it rely on its environment in any way which isn't applicable when the script runs under cron?

Not sure I understand your comment that you ssh into a remote system to run the cronjob, surely the local cron runs the job?
scm is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Similar Threads
Thread Thread Starter Forum Replies Last Post
** Serious Daylight Savings & Cronjob problem ** michioz Redhat / Fedora Linux Help 4 06-27-2006 07:18 PM
Really strange problem with NAT router gepas Linux Networking 2 05-05-2006 05:45 PM
Turkish installation problem in FC5 Daley Redhat / Fedora Linux Help 1 03-24-2006 02:07 PM
Windows XP/SuSe Linux 10.0 RC1 dual boot problem pushpop SuSE Linux Help 1 12-26-2005 01:11 PM
FC-Linux Installation problem AlexPal Redhat / Fedora Linux Help 0 11-25-2004 06:00 AM

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 05:36 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0