Updating QA crontabs: Difference between revisions

From Genecats
Jump to navigationJump to search
No edit summary
No edit summary
Line 17: Line 17:
# [OPTIONAL STEP, only needed for a new job] If you have a new cronjob, test your changes from qateam, for example in the above run <tt>/cluster/bin/x86_64/hubPublicCheck hubPublic  -udcDir=/data/tmp/qa</tt> and your other commands to see if they will work as expected from the home directory.
# [OPTIONAL STEP, only needed for a new job] If you have a new cronjob, test your changes from qateam, for example in the above run <tt>/cluster/bin/x86_64/hubPublicCheck hubPublic  -udcDir=/data/tmp/qa</tt> and your other commands to see if they will work as expected from the home directory.
# Commit and push your changes to the genecats repository hgwdev.crontab.
# Commit and push your changes to the genecats repository hgwdev.crontab.
# In the qateam@hgwdev window you can output the current crontab with "crontab -l", which essentially creates a copy of the crontab, which does not have your edits yet, because you made your edits in YOUR genecats repo, not to the crobtab on hgwdev where you have to log in as QA Team.  You can put this in a temp file such as <tt>crontab -l > /data/tmp/deleteMe</tt>, but it really doesn't matter where you put this file. You could even put it in your home directory, such as <tt>~/temp/crontab.hgwdev</tt>
# This step provides instructions on how to compare YOUR genecats crontab with QA Team's hgwdev crontab. In the qateam@hgwdev window you can output the current crontab with "crontab -l", which essentially creates a copy of the crontab, which does not have your edits yet, because you made your edits in YOUR genecats repo, not to the crontab on QA Team's hgwdev.  You can put this in a temp file such as <tt>crontab -l > /data/tmp/deleteMe</tt>, but it really doesn't matter where you put this file. You could even put it in your home directory, such as <tt>~/temp/crontab.hgwdev</tt>
# You can compare the two to be sure your changes are all you are updating (where <tt>brianlee</tt> is changed to your directory).  <tt>diff /data/tmp/deleteMe ~brianlee/genecats/qa/crontabs/hgwdev.crontab</tt>  
# Now that you have your comparison file, you can compare the two to be sure your changes are all you are updating (where <tt>brianlee</tt> is changed to your directory).  <tt>diff /data/tmp/deleteMe ~brianlee/genecats/qa/crontabs/hgwdev.crontab</tt>. Once you do the diff, you should only see the line that you added or edited.
# From qateam@hgwdev, you now need to update the current crontab by running the new genecats version <tt>crontab ~brianlee/genecats/qa/crontabs/hgwdev.crontab </tt>
# From qateam@hgwdev, you now need to update QA Team's hgwdev current crontab by "running" your revised genecats version: <tt>crontab ~brianlee/genecats/qa/crontabs/hgwdev.crontab </tt>. Now your crontab from your home dir (in the genecats repository) will match the crontab for QA Team's hgwdev.





Revision as of 22:04, 3 February 2017

This page is about changing the nightly cron jobs that run on hgwdev to a controlled fashion.

DO NOT EDIT THE QATEAM hgwdev CRONTAB FILE DIRECTLY

Rather This file is in the genecats git repository (in your home dir): genecats/qa/crontabs/hgwdev.crontab.

  • Go to your genecats repository and do a git pull to bring it up to date.
  • Edit genecats/qa/crontabs/hgwdev.crontab and add your new chronjob or edit the crontab. For example:
MAILTO=braney@soe.ucsc.edu,brianlee@soe.ucsc.edu
HGDB_CONF=.hg.conf.beta

15 03 * * * /cluster/bin/x86_64/hubPublicCheck hubPublic  -udcDir=/data/tmp/qa
16 02 * * * /cluster/bin/x86_64/hgsql -e "select hubUrl from hubPublic" hgcentralbeta | tail -n +2 | while read url; do /cluster/bin/x86_64/hubCheck  -udcDir=/data/tmp/qa $url; done

(Reminder of first numbers: Minute then Hour DOM Month DOW command)

  1. In another terminal you can ssh qateam@hgwdev
  2. [OPTIONAL STEP, only needed for a new job] If you have a new cronjob, test your changes from qateam, for example in the above run /cluster/bin/x86_64/hubPublicCheck hubPublic -udcDir=/data/tmp/qa and your other commands to see if they will work as expected from the home directory.
  3. Commit and push your changes to the genecats repository hgwdev.crontab.
  4. This step provides instructions on how to compare YOUR genecats crontab with QA Team's hgwdev crontab. In the qateam@hgwdev window you can output the current crontab with "crontab -l", which essentially creates a copy of the crontab, which does not have your edits yet, because you made your edits in YOUR genecats repo, not to the crontab on QA Team's hgwdev. You can put this in a temp file such as crontab -l > /data/tmp/deleteMe, but it really doesn't matter where you put this file. You could even put it in your home directory, such as ~/temp/crontab.hgwdev
  5. Now that you have your comparison file, you can compare the two to be sure your changes are all you are updating (where brianlee is changed to your directory). diff /data/tmp/deleteMe ~brianlee/genecats/qa/crontabs/hgwdev.crontab. Once you do the diff, you should only see the line that you added or edited.
  6. From qateam@hgwdev, you now need to update QA Team's hgwdev current crontab by "running" your revised genecats version: crontab ~brianlee/genecats/qa/crontabs/hgwdev.crontab . Now your crontab from your home dir (in the genecats repository) will match the crontab for QA Team's hgwdev.


Resources: Test your cron setting: http://cron.schlitt.info/