To administer your WestHost account, please enter your
Domain Name or Server Manager Username.

WestHost: Professional Website Hosting Company








Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Member
    Join Date
    Apr 2004
    Location
    North Hills, California
    Posts
    63

    Default Installing a Crontab

    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
    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

  2. #2
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    On WestHost 2.0, you have to use:

    editcron -e
    Fayez Zaheer

  3. #3
    Member
    Join Date
    Apr 2004
    Location
    North Hills, California
    Posts
    63

    Default

    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.

    Daniel
    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

  4. #4
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    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

  5. #5
    Member
    Join Date
    Apr 2004
    Location
    North Hills, California
    Posts
    63

    Default

    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

  6. #6
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    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

  7. #7
    Member
    Join Date
    Apr 2004
    Location
    North Hills, California
    Posts
    63

    Default

    (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-archive
    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

  8. #8
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    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

  9. #9
    Member
    Join Date
    Apr 2004
    Location
    North Hills, California
    Posts
    63

    Default

    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.

    Daniel
    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

  10. #10
    Senior Member SJP's Avatar
    Join Date
    Aug 2003
    Location
    Orcas, Wa
    Posts
    205

    Default

    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

  1. HowTo Guide: Installing Subversion
    By Pachango in forum General Discussion
    Replies: 25
    Last Post: 12-17-2008, 11:08 AM
  2. HowTo Tutorial: Using and Installing SSH
    By sunzon in forum E-mail / FTP Management
    Replies: 6
    Last Post: 05-10-2008, 08:07 AM
  3. Howto guide: Installing Mailman
    By nsc in forum CGI Scripts / Perl
    Replies: 6
    Last Post: 02-06-2007, 12:57 AM
  4. Installing Perl modules with CPAN
    By jalal in forum CGI Scripts / Perl
    Replies: 19
    Last Post: 11-03-2005, 11:02 AM
  5. Upgrade SpamAssassin using CPAN?
    By j103c in forum E-mail / FTP Management
    Replies: 54
    Last Post: 06-10-2004, 04:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •