On the last system I used, I could install my crontab by using the command
crontab -e
and then editing the crontab. That seems to do nothing in the westhost environment. How do I install a crontab here?
Daniel
Results 1 to 10 of 24
Thread: Installing a Crontab
-
05-02-2004, 07:47 AM #1Member
- Join Date
- Apr 2004
- Location
- North Hills, California
- Posts
- 63
Installing a Crontab
H: faigin -at cahighways -dot org
Learn about Judaism: http://www.mljewish.org, http://www.scjfaq.org
Drive California Highways: http://www.cahighways.org
Play more boardgames: http://www.boardgamegeek.com
-
05-02-2004, 09:59 AM #2
On WestHost 2.0, you have to use:
editcron -eFayez Zaheer
-
05-07-2004, 02:03 PM #3Member
- Join Date
- Apr 2004
- Location
- North Hills, California
- Posts
- 63
Editcron worked to install the crontab, but it doesn't seem to be running the tasks in there ... at least I'm getting neither the normal cron acknowledgement messages via email when jobs run, nor do I see the output of the jobs.
DanielH: faigin -at cahighways -dot org
Learn about Judaism: http://www.mljewish.org, http://www.scjfaq.org
Drive California Highways: http://www.cahighways.org
Play more boardgames: http://www.boardgamegeek.com
-
05-07-2004, 05:12 PM #4
Hmm, it's possible that because of the high load on the servers lately that your cron jobs are being delayed (or maybe even skipped) - it has happened to me before. What is the job that you added?
Fayez Zaheer
-
05-07-2004, 06:34 PM #5Member
- Join Date
- Apr 2004
- Location
- North Hills, California
- Posts
- 63
The jobs in my crontab either:
(1) Send out a mailing list by sending a single message to the listproc host.
(2) Send control messages to my autoresponder on another machine
[In other words... they are not high load.]H: faigin -at cahighways -dot org
Learn about Judaism: http://www.mljewish.org, http://www.scjfaq.org
Drive California Highways: http://www.cahighways.org
Play more boardgames: http://www.boardgamegeek.com
-
05-08-2004, 04:24 AM #6
Hmm, I see... Well I was kind of hoping for the exact lines (code) that is contained in your crontab to see if maybe there is a "syntax" error or something. Have you tried running the command(s) that you have in there off the prompt to make sure they are correct/run?
Fayez Zaheer
-
05-08-2004, 10:01 AM #7Member
- Join Date
- Apr 2004
- Location
- North Hills, California
- Posts
- 63
(1) The commands do run successfully from the command line.
(2) The syntax is the same as I had on my previous shell account.
Here it is (however, wordwrap will confuse you):
00 22 * * * /home/cahighways/bin/mrj.backup -quiet
55 23 * * * /home/cahighways/bin/mrj.send -quiet
30 20 * * 0 /home/cahighways/bin/mrj.makearcindex
02 10 5 * * /usr/sbin/sendmail -oi -f faigin -oem -odb scjp@scjm.jewish-usenet.org < /home/cahighways/S.C.J/CANNED-MAIL/scjp.monthly.archive
04 10 * * 6 /usr/sbin/sendmail -oi -f faigin -oem -odb scjp@scjm.jewish-usenet.org < /home/cahighways/S.C.J/CANNED-MAIL/scjp.weekly-pendlog
06 10 25 * * /usr/sbin/sendmail -oi -f faigin -oem -odb scjp@scjm.jewish-usenet.org < /home/cahighways/S.C.J/CANNED-MAIL/scjp.pendtoall
08 10 5 * * /usr/sbin/sendmail -oi -f faigin -oem -odb faigin@scjm.jewish-usenet.org < /home/cahighways/MAIL.R-J/CANNED-MAIL/sendlog-archiveH: faigin -at cahighways -dot org
Learn about Judaism: http://www.mljewish.org, http://www.scjfaq.org
Drive California Highways: http://www.cahighways.org
Play more boardgames: http://www.boardgamegeek.com
-
05-08-2004, 03:28 PM #8
I guess that looks okay to me, except I don't use the leading zeros (e.g. 02, 04, etc.)
Have you edited this file directly? Or did you add all those events in a pico window that popped up after you typed editcron -e and pressed enter? If the former, you could try this: clear out everything in there and save the file and exit, then re-add it all via editron -e. Then see if it runs. Also, you could first type date and press enter to get the server time and then to debug you could enter your jobs with times to run, say, 2 minutes from now - and see if they actually run or not.
Keep us updated.Fayez Zaheer
-
05-09-2004, 08:15 AM #9Member
- Join Date
- Apr 2004
- Location
- North Hills, California
- Posts
- 63
It was entered via editcron, but I used emacs instead (changed the VISUAL and EDITOR environment variables. Pico... ugh! :-)
I did get a pending report last night, so at least some of the tasks seem to work. I'll do some more investigation to see why mrj.send works from the commandline but not from cron... it could be that the perl script doesn't sent some needed environment variable right, or something significant is different in the cron environment.
DanielH: faigin -at cahighways -dot org
Learn about Judaism: http://www.mljewish.org, http://www.scjfaq.org
Drive California Highways: http://www.cahighways.org
Play more boardgames: http://www.boardgamegeek.com
-
05-09-2004, 02:44 PM #10
According to the 2.0 manual your home directory is /www/htdocs and not /home/whatever. Instead of hard coding this path you ought to use the environment variable $HOME i.e. $HOME/bin/mrj.send -quiet . That way when WH 3.0 comes out you won't wind up in this predicament. WH 3.0? Never say never :-)
SJP
Similar Threads
-
HowTo Guide: Installing Subversion
By Pachango in forum General DiscussionReplies: 25Last Post: 12-17-2008, 10:08 AM -
HowTo Tutorial: Using and Installing SSH
By sunzon in forum E-mail / FTP ManagementReplies: 6Last Post: 05-10-2008, 07:07 AM -
Howto guide: Installing Mailman
By nsc in forum CGI Scripts / PerlReplies: 6Last Post: 02-05-2007, 11:57 PM -
Installing Perl modules with CPAN
By jalal in forum CGI Scripts / PerlReplies: 19Last Post: 11-03-2005, 10:02 AM -
Upgrade SpamAssassin using CPAN?
By j103c in forum E-mail / FTP ManagementReplies: 54Last Post: 06-10-2004, 03:35 PM
Reply With Quote