Skip to content

Cron job and keytab

Valentin Kuznetsov edited this page Oct 2, 2017 · 2 revisions

Setting up cron

Aggregation script must be modified before running it automatically with cron! Instructions

Keytab file

Keytab file is used for renewing session while running as cron job. Keytab file can be generated with following commands (replace <username> with your username):

cd /tmp
ktutil
ktutil:  addent -password -p <username>@CERN.CH -k 1 -e rc4-hmac
ktutil:  addent -password -p <username>@CERN.CH -k 1 -e aes256-cts
ktutil:  wkt aggregation.keytab
ktutil:  quit

mv aggregation.keytab ~/

Commands taken from here.

acrontab

Cron job is run every day, every 4 hours. However, aggregation script is run only once for any given date. Cron job table (acrontab -l) looks like this:

# [Minute] [Hour] [Day_of_the_Month] [Month_of_the_Year] [Day_of_the_Week] [Command]
   40       */4    *                  *                   *                 analytix /path/CMSSpark/bin/run_aggregation

Cron job table can be edited with acrontab -e command.

Notice that script is run on analytix node.

Clone this wiki locally