Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Cron Assistance Pls, crontab, Fedora server, not functioning
heemes
post May 17 2005, 04:38 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-May 05
Member No.: 5,008



I have read:

http://www.linuxhelp.net/guides/cron/

and put together a cron job as follows:

0,10,20,30,40,50 * * * * /usr/bin/perl /var/www/cgi-bin/dada/plugins/dada_bridge.pl >> /dev/null 2>&1

I want perl to call the dada_bridge.pl file every 10 minutes to see what is sitting in the mailbox and send it to the dada list I have setup. I know everything is setup correctly on the server as I can run the dada_bridge.pl file manually and the listserv works well. Do I need to specify a user? Would root work? Does the dada.txt file (name of the cron listed above) need to be located somewhere in particular? Please advise. This is one of the last pieces of a month long ordeal setting up this listserv, would be nice to setup correctly.

Paul/Heemes
Go to the top of the page
 
+Quote Post
michaelk
post May 17 2005, 05:31 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



Your job needs to be added to the cron table of a user. It can be root or any regular username as long as that regular user has read permissions in the directory where your perl script is located.

You can add the job using the crontab utility like the example in the guide.
crontab -e
Go to the top of the page
 
+Quote Post
heemes
post May 17 2005, 08:32 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-May 05
Member No.: 5,008



So if I make the cron file read:

0,10,20,30,40,50 * * * * chlngday /usr/bin/perl /var/www/cgi-bin/dada/plugins/dada_bridge.pl >> /dev/null 2>&1

things should work? chlngday is the main user on this domain. I have used the commands:

crontab -r (to blow away the old file)

then uploaded the file to the html directory using SFTP, then

crontab dada.txt

on the command line, but alas, it doesn't work even then. Do I have the correct syntax or not? Please advise. I appreciate your help.

Paul/Heemes
Go to the top of the page
 
+Quote Post
michaelk
post May 18 2005, 08:06 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



Does the output of the command crontab -l display your crontab entry correctly?

Can chlngday sucessfully run the cron job as is from the command line (minus the chlngday) ?
Go to the top of the page
 
+Quote Post
heemes
post May 18 2005, 08:59 PM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-May 05
Member No.: 5,008



Will definitely get back on this on Monday; headed out of town for a long weekend. Appreciating everything so far!

Paul
Go to the top of the page
 
+Quote Post
heemes
post May 24 2005, 03:11 PM
Post #6


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-May 05
Member No.: 5,008



> > Does the output of the command crontab -l display your crontab entry correctly?

Yes, I think so, here is what I got:

-bash-2.05b$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (dada.txt installed on Wed May 18 16:22:13 2005)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0,10,20,30,40,50 * * * * chlngday /usr/bin/perl /var/www/cgi-bin/dada/plugins/dada_bridge.pl >> /dev/null 2>&1

> > Can chlngday sucessfully run the cron job as is from the command line (minus the chlngday) ?

How would I know this? Please refresh my memory.
Go to the top of the page
 
+Quote Post
Rathish
post May 24 2005, 07:33 PM
Post #7


Whats this Lie-nix Thing?
*

Group: Members
Posts: 17
Joined: 4-April 05
Member No.: 4,822



hi,

User crontabs
----------------
Stored as /var/spool/cron/<user>
View with: crontab -l
Edit with: crontab -e
Edit a specific users crontab(root only): crontab -u <user> ( For root !!! )

regards,
Rathish.K
Go to the top of the page
 
+Quote Post
heemes
post May 24 2005, 08:38 PM
Post #8


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-May 05
Member No.: 5,008



Thanks, Rathish, for the feedback. But wasn't the question...

> > Can chlngday sucessfully run the cron job as is from the command line (minus the chlngday) ?

I don't know how to answer this question, unless I am missing something in what Rathish wrote. Please aide me in finding the answer.

Paul
Go to the top of the page
 
+Quote Post
heemes
post May 25 2005, 05:34 PM
Post #9


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-May 05
Member No.: 5,008



Ok, I know the answer now, after putting on my thinking cap. Please excuse my ignorance in this.

I cannot run the plugin dada_bridge.pl. Here is the error message I get:

-bash-2.05b$ perl /var/www/cgi-bin/dada/plugins/dada_bridge.pl
Can't locate DADA/Config.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.0/mach /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.0/BSDPAN /usr/local/lib/perl5/5.8.0/mach /usr/local/lib/perl5/5.8.0 ../ ../DADA ../DADA/perllib . ./ ./DADA ./DADA/perllib /usr/lib/perl5/5.8.1/i386-linux-thread-multi /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl) at /var/www/cgi-bin/dada/plugins/dada_bridge.pl line 23.
BEGIN failed--compilation aborted at /var/www/cgi-bin/dada/plugins/dada_bridge.pl line 23.

How do I modify the path (which seems to be the next step) so that this puppy will run?

Thanks for everything!

Paul/Heemes
Go to the top of the page
 
+Quote Post
heemes
post Jun 8 2005, 09:14 PM
Post #10


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-May 05
Member No.: 5,008



Ok, solved the matter by learning how to write a shell script, then tying it to the cron job.

Thanks for everything that was contributed in the matter.

Paul
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th October 2017 - 01:03 PM