welcome: please sign in

The following 168 words could not be found in the dictionary of 7 words (including 7 LocalSpellingWords) and are highlighted below:
0th   access   activate   Activating   afs   after   aka   an   and   any   are   as   assuming   at   basic   be   because   bin   by   called   can   Category   changes   check   Checking   clean   command   commands   Commands   comment   common   configuration   Contents   convention   Coop   create   cron   Cron   crontab   day   describes   die   directory   Disabling   display   don   environment   every   Examples   expand   explanation   fg   file   first   following   For   for   format   fourth   general   git   have   hcoop   hour   how   http   idea   important   in   In   is   it   It   jobs   Just   like   line   linux   local   looks   mail   Make   make   making   Making   man   Managing   manual   Manual   Member   midnight   minutes   month   name   needed   needs   net   not   Of   of   on   Once   One   operate   or   other   own   page   pagsh   place   Prerequisites   projects   properly   provided   read   reference   remove   Run   run   Running   running   runs   satisfied   scripts   second   see   server   setup   shell   short   similar   so   something   special   specified   suggested   Sunday   sure   systems   Table   tell   that   The   the   their   them   Then   there   third   This   this   though   tmp   to   try   Unattended   unattended   understand   use   usr   variables   very   week   weekly   will   with   you   your  

Clear message

MemberManual / UsingCron

This page describes the basic use of cron on HCoop systems.


It is very important that you read the Running Unattended Commands page to understand the general idea of how to run unattended commands.

Making a cron configuration file

Cron needs a special configuration file to tell it how to operate. It is suggested that this file be called ~/.crontab, though it can have any name.

For an explanation of the format of this file, see the crontab manual page (or run man crontab on the shell server).

Managing your cron jobs

Activating your cron configuration

Once you are satisfied with your setup, run the following command to activate your changes, assuming that your configuration file is called ~/.crontab:

crontab ~/.crontab

Disabling your cron jobs

Just run crontab -r ~/.crontab

Checking your cron configuration

Run crontab -l to display the jobs cron is running for you.


One convention for making scripts to run commands in their own PAG, as specified by the Running Unattended Commands page, is to create the ~/scripts directory, and place your scripts there. Then, make a cron configuration file that looks something like this.


09 0 * * 0   run-in-pagsh --fg clean-mail           ~/scripts/clean-mail
11 0 * * 0   run-in-pagsh --fg remove-tmp           ~/scripts/remove-tmp
12 0 * * 0   run-in-pagsh --fg weekly-comment-check ~/scripts/weekly-comment-check
*/10 * * * * run-in-pagsh --fg make-git-projects    ~/scripts/make-git-projects

The PATH line is needed so that you have access to run-in-pagsh. Make sure you don't try to reference any other environment variables like $HOME, because cron will not expand them properly.

The first cron command runs something 9 minutes after midnight (aka the "0th" hour), every day of the month, every month, provided that it is Sunday (aka the "0th" day of the week). In short: run something at 12:09 every Sunday.

The second and third commands are similar.

The fourth command runs something every 10 minutes.


MemberManual/UsingCron (last edited 2019-01-14 19:16:18 by ClintonEbadi)