test
[hcoop/zz_old/ikiwiki] / MemberManual / UsingCron.mdwn
1 #pragma section-numbers off
2
3 This page describes the basic use of cron on HCoop systems.
4
5 [[TableOfContents]]
6
7 = Prerequisites =
8
9 It is very important that you read the [:MemberManual/RunningUnattendedCommands:Running Unattended Commands page] to understand the general idea of how to run unattended commands on Mire.
10
11 = Making a cron configuration file =
12
13 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.
14
15 For an explanation of the format of this file, run:
16
17 {{{
18 man 5 crontab
19 }}}
20
21 = Activating your cron configuration =
22
23 Once you are satisfied with your setup, run the following command to activate your changes, assuming that your configuration file is called {{{~/.crontab}}}:
24
25 {{{
26 crontab ~/.crontab
27 }}}
28
29 = Examples =
30
31 One convention for making scripts to run commands in their own PAG, as specified by the [:MemberManual/RunningUnattendedCommands: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.
32
33 {{{
34 09 0 * * 0 ~/scripts/clean-mail
35 11 0 * * 0 ~/scripts/remove-tmp
36 12 0 * * 0 ~/scripts/weekly-comment-check
37 */10 * * * * ~/scripts/make-git-projects
38 }}}