Skip to main content
ExLibris

Knowledge Assistant

BETA
  • Subscribe by RSS
  • Back
    Aleph

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Aleph
    3. Knowledge Articles
    4. Crontab

    Crontab

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1. Additional Information
    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Description:
    We have a number of scripts where we need to set appropriate environment variables by doing "dlib cur50".

    The entry in the crontab for this job is as follows: <BR> 30 6 * * 1,2,3,4,5 su - aleph -c /home/aleph/scripts/aleph_clear_hold.sh > /home/aleph/logs/aleph_clear_hold.log 2> /dev/null

    When this job is run via the crontab, it runs in the Production (20_1) environment. (Because it's a batch job, we are unable to enter "1" or "2" to indicate Production or Training but we have demonstrated that in such cases, the job runs in the Production environment.)

    Using crontab, how would we run home/aleph/scripts/aleph_clear_hold.sh in the Training environment?
    Having separate Production and Training versions of the job would be an acceptable solution but what would the Training version of this job look like?

    Resolution:
    Please note that Ex Libris support in general is not responsible for any scripts created by customers outside the standard Aleph routines.

    But we may help with some hints:

    Each script run from cron should start with the activation of the relevant environment, for example (Aleph 20):

    #!/bin/csh -f
    source /exlibris/aleph/u20_1/alephe/aleph_start

    Important notes:
    1. Use HARD CODED PATH to aleph_start- not environment variable.
    2. In case the same script needs to be activated in two different copies (a20_1 and a20_2), two examples of scripts should be created - one for every environment, with activation of relevant aleph_start

    If additional aliases/definitions are used (for example dlib command used), .cshrc should also be activated:

    #!/bin/csh -f
    source /exlibris/aleph/a20_1/alephm/.cshrc

    Please change the relevant scripts and re-check the issue.

    Additional Information

    crontab, scripts, PATH to aleph_start


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Cron jobs released 1 hour late
      • crontab syntax: date/time parameters
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. 20
      2. contype:kba
      3. Prod:Aleph
      4. Type:General
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved