Duty3G/User Guide/Adding and Maintaining Duties
This page was last modified 05:31, 6 August 2007.From Documentation
Revision as of 02:02, 15 September 2006 Moff (Talk | contribs) (→Before You Begin Defining New Duties) ← Previous diff |
Current revision Moff (Talk | contribs) (→Synchronizing crontab) |
||
Line 3: | Line 3: | ||
With duty3G you can automate routine tasks, expedite tedious tasks, delegate sensitive tasks, and simplify complex tasks, while still retaining management control. | With duty3G you can automate routine tasks, expedite tedious tasks, delegate sensitive tasks, and simplify complex tasks, while still retaining management control. | ||
- | By encapsulating routine administration tasks as duties, you free your most expert UNIX staff to do more demanding and innovative work. Routine but sensitive or arcane jobs can be delegated to less qualified staff. | + | By encapsulating routine administration tasks as duties, you free your most expert UNIX and Windows staff to do more demanding and innovative work. Routine but sensitive or arcane jobs can be delegated to less qualified staff. |
We recommend that you define duties for as much of your regular workload as you can. Any task that can be documented can be automated. Many commonly performed duties, duty roles and schedules are provided with duty3G. | We recommend that you define duties for as much of your regular workload as you can. Any task that can be documented can be automated. Many commonly performed duties, duty roles and schedules are provided with duty3G. | ||
Line 12: | Line 12: | ||
==== Before You Begin Defining New Duties ==== | ==== Before You Begin Defining New Duties ==== | ||
- | #Decide who has administrative capabilities. For example, who can add new duties or change existing ones? Who will check the duty audit trail and how often? Refer to the section titled COS/Duty Access in this manual and the companion manual COSmanager Framework Manual for further details on capabilities. | + | #Decide who has administrative capabilities. For example, who can add new duties or change existing ones? Who will check the duty audit trail and how often? Refer to [[Duty3G/User Guide/Duty3G Access | Duty3G Access]] in this guide and the companion guide [[COSmanager/User Guide | COSmanager User Guide]] for further details on capabilities. |
#Document the “who, how and when” for each task you want to automate or delegate. | #Document the “who, how and when” for each task you want to automate or delegate. | ||
#Collect the tasks into groups of related duties and define a set of duty roles to cover this collection. | #Collect the tasks into groups of related duties and define a set of duty roles to cover this collection. | ||
Line 18: | Line 18: | ||
<br> | <br> | ||
- | [[Image:Duty admin.png|frame|Figure 5 — Configuration console, or ‘Maintain Duties’ window]] | + | [[Image:Duty admin.png|frame|Figure 3 — Duty configuration console]] |
''' Duty3G configuration console ''' | ''' Duty3G configuration console ''' | ||
- | Users with sufficient access privileges can operate from the administrator’s console, which is started from the duty3G configuration option. See [[Duty3G Access]] for information on access privileges. | + | Users with sufficient access privileges can operate from the administrator’s console, which is started from the duty3G configuration option. See [[Duty3G/User Guide/Duty3G Access | Duty3G Access]] for information on access privileges. |
This console lets you display duties in a variety of convenient groupings, and maintain (add, change, clone, remove, order and test) those duties. | This console lets you display duties in a variety of convenient groupings, and maintain (add, change, clone, remove, order and test) those duties. | ||
Line 30: | Line 30: | ||
''' View options ''' | ''' View options ''' | ||
- | The view options available from the configuration console are identical to those on the operator’s duty console. These are described in [[Viewing Duties]]. However, users need to bear in mind that the duties displayed are limited by the role | + | The view options available from the configuration console are identical to those on the operator’s duty console. These are described in [[Duty3G/User Guide/Viewing and Performing Duties#Viewing Duties | Viewing Duties]]. However, users need to bear in mind that the duties displayed are limited by the role defined for them in duty3G. An operator will only ever be able to view those duties that they are cleared to perform, whereas an administrator with top-level clearance will be able to view all defined duties. |
- | defined for them in duty3G. An operator will only ever be able to view those duties that they are cleared to perform, whereas an administrator with top-level clearance will be able to view all defined duties. | + | |
<br> | <br> | ||
Line 52: | Line 51: | ||
*should the duty be performed as soon as it is selected, or should the user be prompted for confirmation before proceeding? | *should the duty be performed as soon as it is selected, or should the user be prompted for confirmation before proceeding? | ||
*which duty role does this activity belong to? | *which duty role does this activity belong to? | ||
- | *does the duty need to be run under a COSmanager application (e.g. a backup duty requires COS/Backup to run) | + | *does the duty need to be run under a COSmanager application (e.g. a backup duty requires backup3G to run) |
<br> | <br> | ||
Line 61: | Line 60: | ||
<br> | <br> | ||
''' To define a new scheduled duty ''' | ''' To define a new scheduled duty ''' | ||
+ | [[Image:Duty add prompt.png|frame|Figure 4 — Adding a duty]] | ||
#Select duty3G configuration. | #Select duty3G configuration. | ||
- | #From the duty configuration console, select Maintain > Add. | + | #From the duty configuration console, select <em style="color:darkslategray;font-weight:bold">Duty > Add</em>. |
- | Figure 6 — Prompt form to add a duty | + | |
+ | |||
Fill in the following fields: | Fill in the following fields: | ||
+ | |||
+ | ;Duty list: Enter or choose duty list this duty is to belonf to. The duty console will display the duties grouped by duty list. | ||
;Duty: Enter a name for the duty. This is the description that will appear in the list of duties to be performed. | ;Duty: Enter a name for the duty. This is the description that will appear in the list of duties to be performed. | ||
;Mode: Select ‘scheduled’ in the run mode. | ;Mode: Select ‘scheduled’ in the run mode. | ||
- | ;When: Now choose the schedule to which the duty will be run. You can add a new schedule time if none of the existing ones are suitable – see Adding a Schedule Time on page 39. | + | ;Recurring: Now choose the schedule to which the duty will be run. You can add a new schedule time if none of the existing ones are suitable – see [[Duty3G/User Guide/Adding and Maintaining Duties#Adding a Schedule Time | Adding a Schedule Time]]. |
- | ;Time(s): If you wish to alter the time period for this duty you can override the period in the schedule time. Enter a start time and end time in the format HH:MM-HH:MM. This duty will only appear on the list of outstanding scheduled duties between these times on the days specified in the schedule time. | + | ;At or during: If you wish to alter the time period during which it should be preformed you can override the period specified in the schedule time. Enter a start time and end time in the format HH:MM-HH:MM, -HH:MM or HH:MM-. This duty will only appear on the list of outstanding scheduled duties between these times on the days specified in the schedule time. |
- | Note In the schedule time you specify a start time and a period during which the duty should be performed. | + | |
- | In the duty you specify a start time and an end time. | + | :{{Note| In the schedule time you specify a start time and a period during which the duty should be performed. In the duty you specify a start time and an end time.}} |
+ | |||
;If not done?: What should happen if the duty isn’t performed on the scheduled day? The options are: | ;If not done?: What should happen if the duty isn’t performed on the scheduled day? The options are: | ||
- | ;;outstanding:leave the duty outstanding if not performed | + | :{| |
- | ;;overdue: mark duty as overdue if not performed | + | ! width="80" align="left" | ''outstanding'' |
- | ;;abandon: remove duty from the list of outstanding duties. | + | | leave the duty outstanding if not performed |
- | ;Enabled?: Select ‘yes’ if this duty should be enabled now. Disabled duties do not appear in the duty list. | + | |- |
- | ;Re-enable on: If the duty is to be disabled temporarily, give a date for the duty to be automatically re-enabled. Select ‘no’ for Enabled? and leave the Re-enable on field blank to disable the duty indefinitely. | + | ! align="left" | ''overdue'' |
+ | | mark duty as overdue if not performed | ||
+ | |- | ||
+ | ! align="left" | ''abandon'' | ||
+ | | remove duty from the list of outstanding duties | ||
+ | |- | ||
+ | |} | ||
;Command: Type in the command that you want executed. This can be any command or series of commands that could be entered at the shell prompt, including Functional Toolset commands and variables created by duty3G. | ;Command: Type in the command that you want executed. This can be any command or series of commands that could be entered at the shell prompt, including Functional Toolset commands and variables created by duty3G. | ||
- | ;;You can use the runopt command to define a duty that executes a COSmanager menu option. See Appendix B—Accessing Menu Options as Duties on page 63. | ||
;Pause?: Select ‘yes’ to prompt the user to press Return after the command has executed. | ;Pause?: Select ‘yes’ to prompt the user to press Return after the command has executed. | ||
- | ;Terminal?: Tells duty3G whether this command will need a terminal emulator window under the GUI version. | ||
- | If your command reads only from standard input, writes only to standard output and standard error, and doesn’t expect to be | + | :{{Note| 'Pause?' only displays if you are using the character based interface (CUI).}} |
- | attached to a terminal device (TTY), select ‘no’. | + | |
- | + | ||
- | If the command requires keyboard input or performs cursor addressing, select ‘yes’. For example, if your command lets the | + | |
- | operator enter a file name then edit the file using vi, set Terminal to ‘yes’. This instructs duty3G to run xterm to | + | |
- | emulate a TTY environment. | + | |
;Run on host: Choose the host on which the command is to be run. The field defaults to the name of the current host. | ;Run on host: Choose the host on which the command is to be run. The field defaults to the name of the current host. | ||
- | Note Duties run on a remote host are executed using rsh, and so can’t be interactive. | + | |
- | ;As user: Select the login ID of the user this command is to be executed under. This should be chosen to give the command the permission needed to perform the task. Use ‘Self ’ if this duty is to be run under the login ID of the user executing the task. The default user ID is ‘root’. | + | :{{Note| Duties run on a remote host are executed using the [[COSmanager/User Guide/Configuring COSmanager#Details of each known host on the network | communications method set up for that host]], and so can’t be interactive.}} |
- | ;By role: Select the role to which this duty belongs. By convention, the role ‘Other’ is used for duties that are to be given to all users. | + | |
- | ;Application: If the duty runs under another application such as COS/Backup, select the required application here. Leave the field blank if no other application needed. | + | ;Application: If the duty runs under another application such as backup3G, select the required application here. Leave the field blank if no other application needed. |
+ | ;Run as user: Select the login ID of the user this command is to be executed under. This should be chosen to give the command the permission needed to perform the task. Use ‘Self ’ if this duty is to be run under the login ID of the user executing the task. The default user ID is ‘root’. | ||
+ | ;Access role: Select the role to which this duty belongs. By convention, the role ‘Other’ is used for duties that are to be given to all users. | ||
+ | ;Re-authenticate?: Select 'yes' to prompt the user for their password before running the command. | ||
+ | |||
+ | |||
+ | Press Enabled to define enable options for this duty. | ||
+ | |||
+ | [[Image:Duty adv prompt.png|frame|Figure 5 — Editing enable options]] | ||
+ | ;Enabled?: Select ‘yes’ if this duty should be enabled now. Disabled duties do not appear in the duty list. | ||
+ | ;Enable on: If the duty is to be disabled temporarily, give a date for the duty to be automatically enabled. Select ‘no’ for Enabled? and leave the Enable on field blank to disable the duty indefinitely. | ||
+ | ;Disable on: If the duty is to be disabled temporarily, give a date for the duty to be automatically disabled. | ||
+ | |||
+ | |||
+ | Press Return. | ||
+ | |||
+ | Press Dependency to define a dependency for this duty. | ||
+ | |||
;Dependency: Select any duty that has to be performed before the current duty can be executed. If this duty is not to be dependent on other duty, leave the field blank. | ;Dependency: Select any duty that has to be performed before the current duty can be executed. If this duty is not to be dependent on other duty, leave the field blank. | ||
+ | |||
+ | |||
+ | Press Return. | ||
+ | |||
+ | |||
+ | ;Duty notes: Enter a file name for a text or HTML document containing associated ''Operator'' notes for this duty. The file must be stored in <code>duty_5.1/local/notes</code>. | ||
Press Accept to finish defining this duty. | Press Accept to finish defining this duty. | ||
<br> | <br> | ||
+ | |||
==== How to Define an Automatic Duty ==== | ==== How to Define an Automatic Duty ==== | ||
Line 105: | Line 132: | ||
<br> | <br> | ||
- | ''' To define a new automatic duty: ''' | + | ''' To define a new automatic duty ''' |
#Select duty3G configuration. | #Select duty3G configuration. | ||
- | #From the duty configuration console, select Maintain > Add and fill in | + | #From the duty configuration console, select <em style="color:darkslategray;font-weight:bold">Duty > Add</em>. |
- | the following fields: | + | |
- | Duty Enter a name for the duty. This is the description that will appear | + | Fill in the following fields: |
- | in the list of duties to be performed. | + | |
- | Mode Select ‘automatic’ in the run mode. | + | ;Duty: Enter a name for the duty. This is the description that will appear in the list of duties to be performed. |
- | When Now choose the schedule to which the duty will be run. You can | + | ;Mode: Select ‘automatic’ in the run mode. |
- | add a new schedule time if none of the existing ones are suitable – | + | ;Recurring: Now choose the schedule to which the duty will be run. You can add a new schedule time if none of the existing ones are suitable – see [[Duty3G/User Guide/Adding and Maintaining Duties#Adding a Schedule Time | Adding a Schedule Time]]. |
- | see Adding a Schedule Time on page 39. | + | ;At or during: Enter a time or list of times (see [[Duty3G/User Guide/Duty Management#Run Time for Automatic Duties | Run Time for Automatic Duties]] for more on time formats). The duty will run at these times on the days specified in the previous step. |
- | Time(s) Enter a time or list of times (see Run Time for Automatic Duties on | + | ;Command: Type in the command that you want executed. This can be any command or series of commands that could be entered at the shell prompt, including Functional Toolset commands and variables created by duty3G. The commands should not be interactive. |
- | page 27 for more on time formats). The duty will run at these | + | ;Run on host: Choose the host on which the command is to be run. The field defaults to the name of the current host. |
- | times on the days specified in the previous step. | + | ;Application: If the duty runs under another application such as backup3G, select the required application here. Leave the field blank if no other application needed. |
- | Enabled? Select ‘yes’ if this duty should be enabled now. Disabled duties do | + | ;Run as user: Select the login ID of the user this command is to be executed under. This should be chosen to give the command the permission needed to perform the task. Use ‘Self ’ if this duty is to be run under the login ID of the user executing the task. The default user ID is ‘root’. |
- | not appear in the duty list. | + | |
- | Re-enable on If the duty is to be disabled temporarily, give a date for the duty to | + | |
- | be automatically re-enabled. Select ‘no’ for Enabled? and leave | + | Press Enabled to define enable options for this duty. |
- | the Re-enable on: field blank to disable the duty indefinitely. | + | |
- | Command Type in the command that you want executed. This can be any | + | ;Enabled?: Select ‘yes’ if this duty should be enabled now. Disabled duties do not appear in the duty list. |
- | command or series of commands that could be entered at the shell | + | ;Enable on: If the duty is to be disabled temporarily, give a date for the duty to be automatically enabled. Select ‘no’ for Enabled? and leave the Enable on field blank to disable the duty indefinitely. |
- | prompt, including Functional Toolset commands and variables | + | ;Disable on: If the duty is to be disabled temporarily, give a date for the duty to be automatically disabled. |
- | created by duty3G. The commands should not be interactive. | + | |
- | You can use the runopt command to define a duty that executes | + | |
- | a COSmanager menu option. See Appendix B—Accessing Menu | + | Press Return. |
- | Options as Duties on page 63. | + | |
- | Run on host Choose the host on which the command is to be run. The field | + | ;Duty notes: Enter a file name for a text or HTML document containing associated ''Operator'' notes for this duty. The file must be stored in <code>duty_5.1/local/notes</code>. |
- | defaults to the name of the current host. | + | |
- | As user Select the login ID of the user this command is to be executed | + | |
- | under. This should be chosen to give the command the permission | + | |
- | needed to perform the task. Use ‘Self ’ if this duty is to be run | + | |
- | Adding and Maintaining Duties 37 | + | |
- | under the login ID of the user executing the task. The default user | + | |
- | ID is ‘root’. | + | |
- | Application If the duty runs under another application such as COS/Backup, | + | |
- | select the required application here. Leave the field blank if no | + | |
- | other application needed. | + | |
Press Accept to finish defining this duty. | Press Accept to finish defining this duty. | ||
- | How to Define an At-request Duty | + | |
- | You may want to look at the ‘Duty list report’ in the duty3G configuration | + | |
- | console for some examples of at-request duties that have already been defined. | + | <br> |
- | To define a new at-request duty | + | |
- | 1. Select duty3G configuration. | + | ==== How to Define an At-request Duty ==== |
- | 2. From the duty configuration console, select Maintain > Add and fill in | + | |
- | the following fields: | + | You may want to look at the ‘Duty list report’ in the duty3G configuration console for some examples of at-request duties that have already been defined. |
- | Duty Enter a name for the duty. This is the description that will appear | + | |
- | in the list of duties to be performed. | + | |
- | Mode Select ‘request’ for the run mode. | + | ''' To define a new at-request duty''' |
- | Enabled? Select ‘yes’ if this duty should be enabled now. Disabled duties do | + | |
- | not appear in the duty list. | + | #Select duty3G configuration. |
- | Re-enable on If the duty is to be disabled temporarily, give a date for the duty to | + | #From the duty configuration console, select <em style="color:darkslategray;font-weight:bold">Duty > Add</em>. |
- | be automatically re-enabled. Select ‘no’ for Enabled? and leave | + | |
- | the Re-enable on field blank to disable the duty indefinitely. | + | |
- | Command Type in the command that you want executed. This can be any | + | Fill in the following fields: |
- | command or series of commands that could be entered at the shell | + | |
- | prompt, including Functional Toolset commands and variables | + | ;Duty list: Enter or choose duty list this duty is to belonf to. The duty console will display the duties grouped by duty list. |
- | created by duty3G. | + | ;Duty: Enter a name for the duty. This is the description that will appear in the list of duties to be performed. |
- | 38 Adding and Maintaining Duties | + | ;Mode: Select ‘request’ for the run mode. |
- | You can use the runopt command to define a duty that executes | + | ;Command: Type in the command that you want executed. This can be any command or series of commands that could be entered at the shell prompt, including Functional Toolset commands and variables created by duty3G. |
- | a duty3G menu option. See Appendix B—Accessing Menu Options as | + | ;Pause?: Select ‘yes’ to prompt the user to press Return after the command has executed. |
- | Duties on page 63. | + | |
- | Pause? Select ‘yes’ to prompt the user to press Return after the | + | :{{Note| 'Pause?' only displays if you are using the character based interface (CUI).}} |
- | command has executed. | + | |
- | Terminal? Tells duty3G whether this command will need a terminal emulator | + | ;Run on host: Choose the host on which the command is to be run. The field defaults to the name of the current host. |
- | window under the GUI version. | + | |
- | If your command reads only from standard input, writes only to | + | :{{Note| Duties run on a remote host are executed using rsh, and so can’t be interactive.}} |
- | standard output and standard error, and doesn’t expect to be | + | |
- | attached to a terminal device (TTY), select ‘no’. | + | ;Application: If the duty runs under another application such as backup3G, select the required application here. Leave the field blank if no other application needed. |
- | If the command requires keyboard input or performs cursor | + | ;Run as user: Select the login ID of the user this command is to be executed under. This should be chosen to give the command the permission needed to perform the task. Use ‘Self ’ if this duty is to be run under the login ID of the user executing the task. The default user ID is ‘root’. |
- | addressing, select ‘yes’. For example, if your command lets the | + | ;Access role: Select the role to which this duty belongs. By convention, the role ‘Other’ is used for duties that are to be given to all users. |
- | operator enter a file name then edit the file using vi, set | + | ;Re-authenticate: Select 'yes' to prompt the user for their password before running the command. |
- | Terminal to ‘yes’. This instructs duty3G to run xterm to | + | |
- | emulate a TTY environment. | + | |
- | Note Duties run on a remote host are executed using rsh, and so can’t be | + | Press Enabled to define enable options for this duty. |
- | interactive. | + | |
- | Run on host Choose the host on which the command is to be run. The field | + | ;Enabled?: Select ‘yes’ if this duty should be enabled now. Disabled duties do not appear in the duty list. |
- | defaults to the name of the current host. | + | ;Enable on: If the duty is to be disabled temporarily, give a date for the duty to be automatically enabled. Select ‘no’ for Enabled? and leave the Enable on field blank to disable the duty indefinitely. |
- | As user Select the login ID of the user this command is to be executed | + | ;Disable on: If the duty is to be disabled temporarily, give a date for the duty to be automatically disabled. |
- | under. This should be chosen to give the command the permission | + | |
- | needed to perform the task. Use ‘Self ’ if this duty is to be run | + | |
- | under the login ID of the user executing the task. The default user | + | Press Return. |
- | ID is ‘root’. | + | |
- | By role Select the role to which this duty belongs. By convention, the role | + | ;Duty notes: Enter a file name for a text or HTML document containing associated ''Operator'' notes for this duty. The file must be stored in <code>duty_5.1/local/notes</code>. |
- | ‘Other’ is used for duties that are to be given to all users. | + | |
- | Application If the duty runs under another application such as COS/Backup, | + | |
- | select the required application here. Leave the field blank if no | + | |
- | other application needed. | + | |
Press Accept to finish defining this duty. | Press Accept to finish defining this duty. | ||
- | Adding and Maintaining Duties 39 | + | |
- | Assigning a Duty to a Different Access Role | + | |
- | Operators can only run duties belonging to one of their access roles. You can see | + | <br> |
- | which role a duty is assigned to in the duty configuration console. | + | |
- | To assign a duty to a different group of duty3G users: | + | ==== Assigning a Duty to a Different Access Role ==== |
- | 1. Select duty3G configuration. | + | |
- | 2. Select the duty, then select Maintain > Change. | + | Operators can only run duties belonging to one of their access roles. You can see which role a duty is assigned to in the duty configuration console. |
- | 3. Move to the By role field, and press Choose. Choose another role. | + | |
+ | |||
+ | '''To assign a duty to a different group of duty3G users:''' | ||
+ | |||
+ | #Select duty3G configuration. | ||
+ | #Select the duty, then select <em style="color:darkslategray;font-weight:bold">Duty > Change</em>. | ||
+ | #Move to the By role field, and press Choose. Choose another role. | ||
+ | |||
+ | |||
Press Accept to save the duty. | Press Accept to save the duty. | ||
- | Adding a Schedule Time | + | |
- | Schedule times define processing cycles for running duties. A schedule time specifies | + | <br> |
- | the day and optionally a ‘time window’ or shift during which a duty is scheduled | + | |
- | to be run. You choose from this list when defining a scheduled or automatic duty. | + | ==== Adding a Schedule Time ==== |
- | You can add new schedule times based on your own shifts and processing cycles to | + | |
- | the schedule times provided with duty3G. | + | Schedule times define processing cycles for running duties. A schedule time specifies the day and optionally a ‘time window’ or shift during which a duty is scheduled to be run. You choose from this list when defining a scheduled or automatic duty. You can add new schedule times based on your own shifts and processing cycles to the schedule times provided with duty3G. |
- | There are two ways to define schedule times, listing a combination of times or defining | + | |
- | a command: | + | There are two ways to define schedule times, listing a combination of times or defining a command: |
- | List method | + | |
- | The first method is to list a combination of scheduled days and times in the day, | + | <br> |
- | month, and time fields. All the fields must return ‘true’ for the duty to be scheduled | + | '''List method''' |
- | – that is, there is a logical AND between the day and month fields and the time | + | |
- | period. | + | The first method is to list a combination of scheduled days and times in the day, month, and time fields. All the fields must return ‘true’ for the duty to be scheduled – that is, there is a logical AND between the day and month fields and the time period. |
- | This method is more flexible as it lets you specify that a duty must be performed by | + | |
- | a particular shift or between certain hours. See Scheduled Duties, Schedule Times and | + | This method is more flexible as it lets you specify that a duty must be performed by a particular shift or between certain hours. See [[Duty3G/User Guide/Duty Management#Scheduled Duties.2C Schedule Times and Shifts | Scheduled Duties, Schedule Times and Shifts]] for more details and examples. |
- | Shifts on page 24. for more details and examples. | + | |
- | 40 Adding and Maintaining Duties | + | <br> |
- | Command method | + | '''Command method''' |
- | The other way is to define a schedule command using a command that returns ‘true’ or | + | |
- | ‘false’ for the current date, such as db_datemat. This was the only way to define | + | The other way is to define a schedule command using a command that returns ‘true’ or ‘false’ for the current date, such as db_datemat. Scheduled duties will be displayed only if db_datemat returns ‘true’ for today’s date. |
- | schedule times in versions of COS/Manager prior to 2.7. Scheduled duties will be | + | |
- | displayed only if db_datemat returns ‘true’ for today’s date. | + | <br> |
- | Adding a schedule time using the list method | + | '''Adding a schedule time using the list method''' |
- | 1. Select Maintain > Schedule times from the duty3G configuration | + | [[Image:Duty schedule prompt.png|frame|Figure 8 — Adding a schedule time]] |
- | console. | + | |
- | 2. Select Maintain > Add. | + | #Select <em style="color:darkslategray;font-weight:bold">Tools > Schedules</em> from the duty3G configuration console. |
- | Figure 7 — Adding a schedule time | + | #Select <em style="color:darkslategray;font-weight:bold">Maintain > Add</em>. |
- | Order duty3G allocates an order number, by default ten more than the | + | |
- | previous highest. The order number determines the order in which | + | ;Order: Duty3G allocates an order number, by default ten more than the previous highest. The order number determines the order in which the list of outstanding scheduled duties is presented to the user. If you want to keep the new time with a group of similar schedule times, change the order to an available number close to that of the group. |
- | the list of outstanding scheduled duties is presented to the user. If | + | ;When: Enter a descriptive term, consistent with the names displayed in the list of schedule times. |
- | you want to keep the new time with a group of similar schedule | + | ;Schedule command: Leave blank for date/time matching. |
- | times, change the order to an available number close to that of the | + | |
- | group. | + | The next three fields control which days a duty will be scheduled. By default the fields return ‘true’ for every day of the month, every month of the year, and every day of the week. You restrict the scheduled days by limiting one or more of the fields to certain values or ranges. |
- | When Enter a descriptive term, consistent with the names displayed in | + | |
- | the list of schedule times. | + | ;Day of Month: Enter a list of days of the month.<br>Example: first week of the month: 1-7 |
- | Adding and Maintaining Duties 41 | + | ;Month of Year: Enter a list of months.<br>Example: first month of every quarter: 1,4,7,10 |
- | Schedule command | + | ;Day of Week: Enter the days of the week (0 = Sunday, 6 = Saturday)<br>Example: Monday to Wednesday and Friday: 1-3,5 |
- | Leave blank for date/time matching. | + | ;Start time, Period length: By default a duty is scheduled to be done any time on the scheduled day. To restrict this to a shorter period such as an operator shift, enter the start time and a period in hours and minutes.<br>Example: Specify a schedule time from 10 pm on the scheduled day to 6 am the following day:<br>Start time 22:00<br>Period length 08:00 |
- | The next three fields control which days a duty will be scheduled. By default the | + | ;Comment: If you wish you can enter a comment about this schedule time. |
- | fields return ‘true’ for every day of the month, every month of the year, and every | + | |
- | day of the week. You restrict the scheduled days by limiting one or more of the | + | |
- | fields to certain values or ranges. | + | |
- | Day of Month Enter a list of days of the month. | + | |
- | Example: first week of the month: 1-7 | + | |
- | Month of Year Enter a list of months. | + | |
- | Example: first month of every quarter: 1,4,7,10 | + | |
- | Day of Week Enter the days of the week (0 = Sunday, 6 = Saturday) | + | |
- | Example: Monday to Wednesday and Friday: 1-3,5 | + | |
- | Start time, Period length | + | |
- | By default a duty is scheduled to be done any time on the | + | |
- | scheduled day. To restrict this to a shorter period such as an | + | |
- | operator shift, enter the start time and a period in hours and | + | |
- | minutes. | + | |
- | Example: Specify a schedule time from 10 pm on the scheduled | + | |
- | day to 6 am the following day: | + | |
- | Start time 22:00 | + | |
- | Period length 08:00 | + | |
- | Comment If you wish you can enter a comment about this schedule time. | + | |
Press Accept to complete the definition of the schedule time. | Press Accept to complete the definition of the schedule time. | ||
- | Adding a schedule time using the command method | + | |
- | 1. Select Maintain > Schedule times from the duty3G configuration | + | <br> |
- | console. | + | '''Adding a schedule time using the command method''' |
- | 2. Select Maintain > Add. | + | |
- | 42 Adding and Maintaining Duties | + | #Select <em style="color:darkslategray;font-weight:bold">Duty > Schedules</em> from the duty3G configuration console. |
- | Order duty3G allocates an order number, by default ten more than the | + | #Select <em style="color:darkslategray;font-weight:bold">Maintain > Add</em>. |
- | previous highest. The order number determines the order in which | + | |
- | the list of outstanding scheduled duties is presented to the user. If | + | ;Order: Duty3G allocates an order number, by default ten more than the previous highest. The order number determines the order in which the list of outstanding scheduled duties is presented to the user. If you want to keep the new time with a group of similar schedule times, change the order to an available number close to that of the group. |
- | you want to keep the new time with a group of similar schedule | + | ;When: Enter a descriptive name, consistent with the names displayed in the list of schedule times. |
- | times, change the order to an available number close to that of the | + | ;Schedule command: Enter a command (using db_datemat or similar) which will return ‘true’ only if today’s date is when the duty should be run. |
- | group. | + | ;Comment: If you wish you can enter a comment about this schedule time. |
- | When Enter a descriptive name, consistent with the names displayed in | + | |
- | the list of schedule times. | + | |
- | Schedule command | + | |
- | Enter a command (using db_datemat or similar) which will | + | |
- | return ‘true’ only if today’s date is when the duty should be run. | + | |
- | Comment If you wish you can enter a comment about this schedule time. | + | |
Press Accept to complete the definition of the schedule time. | Press Accept to complete the definition of the schedule time. | ||
- | Synchronizing crontab | + | |
- | To ensure that the automatic duties in the duty list are correctly replicated in the | + | <br> |
- | COSmanager crontab, use Maintain > Sync crontab on the duty3G | + | |
- | configuration console. Carry out this task if problems are experienced with | + | ==== Synchronizing crontab ==== |
- | automatic duties in duty3G which may be caused by inconsistencies between the | + | |
- | tables. | + | To ensure that the automatic duties in the duty list are correctly replicated in the COSmanager crontab, use <em style="color:darkslategray;font-weight:bold">Tools > Sync crontab</em> on the duty3G configuration console. Carry out this task if problems are experienced with automatic duties in duty3G which may be caused by inconsistencies between the tables. |
- | On selecting the Sync crontab option, duty3G displays a dialogue box, which | + | |
- | indicates what is about to happen and provides the option to exit or to proceed. | + | On selecting the Sync crontab option, duty3G displays a dialogue box, which indicates what is about to happen and provides the option to exit or to proceed. |
- | Press Accept to synchronize the tables; duty3G will return a message indicating | + | |
- | the outcome of the task. | + | Press Accept to synchronize the tables; duty3G will return a message indicating the outcome of the task. |
- | Note this task does not alter the root crontab in any way; the only table | + | |
- | amended is the COSmanager crontab. | + | :{{Note| This task does not alter the root crontab in any way; the only table amended is the COSmanager crontab.}} |
+ | |||
+ | <br> | ||
+ | |||
+ | ==[[Duty3G/User Guide/Viewing and Performing Duties | Viewing and Performing Duties]]== | ||
+ | |||
+ | ==[[Duty3G/User Guide/Appendix A — Installing duty3G | Appendix A - Installing duty3G]]== | ||
+ | |||
+ | ==[[Duty3G/User Guide/Appendix B — duty3G Menus by Role | Appendix B - Duty3G Menus by Role]]== | ||
+ | |||
+ | ==[[Duty3G/User Guide/Glossary | Glossary]]== |
Current revision
Contents |
Adding and Maintaining Duties
With duty3G you can automate routine tasks, expedite tedious tasks, delegate sensitive tasks, and simplify complex tasks, while still retaining management control.
By encapsulating routine administration tasks as duties, you free your most expert UNIX and Windows staff to do more demanding and innovative work. Routine but sensitive or arcane jobs can be delegated to less qualified staff.
We recommend that you define duties for as much of your regular workload as you can. Any task that can be documented can be automated. Many commonly performed duties, duty roles and schedules are provided with duty3G.
This chapter describes the process of preparing for and defining different kinds of duties, adding schedule times and bringing crontab into line with duty3G.
Before You Begin Defining New Duties
- Decide who has administrative capabilities. For example, who can add new duties or change existing ones? Who will check the duty audit trail and how often? Refer to Duty3G Access in this guide and the companion guide COSmanager User Guide for further details on capabilities.
- Document the “who, how and when” for each task you want to automate or delegate.
- Collect the tasks into groups of related duties and define a set of duty roles to cover this collection.
- Assign duty roles to users.
Duty3G configuration console
Users with sufficient access privileges can operate from the administrator’s console, which is started from the duty3G configuration option. See Duty3G Access for information on access privileges.
This console lets you display duties in a variety of convenient groupings, and maintain (add, change, clone, remove, order and test) those duties.
This console has more functions than the operator console and can be used to configure new duties, amend existing duties and remove unwanted items in addition to viewing and performing all available duties.
View options
The view options available from the configuration console are identical to those on the operator’s duty console. These are described in Viewing Duties. However, users need to bear in mind that the duties displayed are limited by the role defined for them in duty3G. An operator will only ever be able to view those duties that they are cleared to perform, whereas an administrator with top-level clearance will be able to view all defined duties.
To Define a Duty
Duties are provided with duty3G for many common operations and system administration tasks. To get the most from the duty list, you should tailor it to your site's needs by adding duties to automate all your other routine tasks.
Planning your duty procedures
As you plan what tasks should be defined as duties there are a few things to consider:
- can this activity be done in one step or are there two or more components that need to be done in order?
- must this duty be done in sequence – that is, before or after another duty (are there any dependent duties)?
- should it be done on a regular cycle, or will it be done only when needed?
- if it is scheduled to be done on a given day and isn’t, should it be carried over to the next day or shift? Should it be marked as overdue/outstanding or be abandoned?
- does this activity require user intervention or can it be run automatically?
- should it run at a set time of day or within a shift or time period?
- what commands or shell scripts will be used?
- which user ID should this command execute under, and on what host should the command be run?
- should the duty be performed as soon as it is selected, or should the user be prompted for confirmation before proceeding?
- which duty role does this activity belong to?
- does the duty need to be run under a COSmanager application (e.g. a backup duty requires backup3G to run)
How to Define a Scheduled Duty
You may want to look at the ‘Duty list report’ in the duty3G configuration console for some examples of scheduled duties that have already been defined.
To define a new scheduled duty
- Select duty3G configuration.
- From the duty configuration console, select Duty > Add.
Fill in the following fields:
- Duty list
- Enter or choose duty list this duty is to belonf to. The duty console will display the duties grouped by duty list.
- Duty
- Enter a name for the duty. This is the description that will appear in the list of duties to be performed.
- Mode
- Select ‘scheduled’ in the run mode.
- Recurring
- Now choose the schedule to which the duty will be run. You can add a new schedule time if none of the existing ones are suitable – see Adding a Schedule Time.
- At or during
- If you wish to alter the time period during which it should be preformed you can override the period specified in the schedule time. Enter a start time and end time in the format HH:MM-HH:MM, -HH:MM or HH:MM-. This duty will only appear on the list of outstanding scheduled duties between these times on the days specified in the schedule time.
Note | |
In the schedule time you specify a start time and a period during which the duty should be performed. In the duty you specify a start time and an end time. |
- If not done?
- What should happen if the duty isn’t performed on the scheduled day? The options are:
outstanding leave the duty outstanding if not performed overdue mark duty as overdue if not performed abandon remove duty from the list of outstanding duties
- Command
- Type in the command that you want executed. This can be any command or series of commands that could be entered at the shell prompt, including Functional Toolset commands and variables created by duty3G.
- Pause?
- Select ‘yes’ to prompt the user to press Return after the command has executed.
Note | |
'Pause?' only displays if you are using the character based interface (CUI). |
- Run on host
- Choose the host on which the command is to be run. The field defaults to the name of the current host.
Note | |
Duties run on a remote host are executed using the communications method set up for that host, and so can’t be interactive. |
- Application
- If the duty runs under another application such as backup3G, select the required application here. Leave the field blank if no other application needed.
- Run as user
- Select the login ID of the user this command is to be executed under. This should be chosen to give the command the permission needed to perform the task. Use ‘Self ’ if this duty is to be run under the login ID of the user executing the task. The default user ID is ‘root’.
- Access role
- Select the role to which this duty belongs. By convention, the role ‘Other’ is used for duties that are to be given to all users.
- Re-authenticate?
- Select 'yes' to prompt the user for their password before running the command.
Press Enabled to define enable options for this duty.
- Enabled?
- Select ‘yes’ if this duty should be enabled now. Disabled duties do not appear in the duty list.
- Enable on
- If the duty is to be disabled temporarily, give a date for the duty to be automatically enabled. Select ‘no’ for Enabled? and leave the Enable on field blank to disable the duty indefinitely.
- Disable on
- If the duty is to be disabled temporarily, give a date for the duty to be automatically disabled.
Press Return.
Press Dependency to define a dependency for this duty.
- Dependency
- Select any duty that has to be performed before the current duty can be executed. If this duty is not to be dependent on other duty, leave the field blank.
Press Return.
- Duty notes
- Enter a file name for a text or HTML document containing associated Operator notes for this duty. The file must be stored in
duty_5.1/local/notes
.
Press Accept to finish defining this duty.
How to Define an Automatic Duty
You may want to look at the ‘Duty list report’ in the duty3G configuration console for some examples of automatic duties that have already been defined.
To define a new automatic duty
- Select duty3G configuration.
- From the duty configuration console, select Duty > Add.
Fill in the following fields:
- Duty
- Enter a name for the duty. This is the description that will appear in the list of duties to be performed.
- Mode
- Select ‘automatic’ in the run mode.
- Recurring
- Now choose the schedule to which the duty will be run. You can add a new schedule time if none of the existing ones are suitable – see Adding a Schedule Time.
- At or during
- Enter a time or list of times (see Run Time for Automatic Duties for more on time formats). The duty will run at these times on the days specified in the previous step.
- Command
- Type in the command that you want executed. This can be any command or series of commands that could be entered at the shell prompt, including Functional Toolset commands and variables created by duty3G. The commands should not be interactive.
- Run on host
- Choose the host on which the command is to be run. The field defaults to the name of the current host.
- Application
- If the duty runs under another application such as backup3G, select the required application here. Leave the field blank if no other application needed.
- Run as user
- Select the login ID of the user this command is to be executed under. This should be chosen to give the command the permission needed to perform the task. Use ‘Self ’ if this duty is to be run under the login ID of the user executing the task. The default user ID is ‘root’.
Press Enabled to define enable options for this duty.
- Enabled?
- Select ‘yes’ if this duty should be enabled now. Disabled duties do not appear in the duty list.
- Enable on
- If the duty is to be disabled temporarily, give a date for the duty to be automatically enabled. Select ‘no’ for Enabled? and leave the Enable on field blank to disable the duty indefinitely.
- Disable on
- If the duty is to be disabled temporarily, give a date for the duty to be automatically disabled.
Press Return.
- Duty notes
- Enter a file name for a text or HTML document containing associated Operator notes for this duty. The file must be stored in
duty_5.1/local/notes
.
Press Accept to finish defining this duty.
How to Define an At-request Duty
You may want to look at the ‘Duty list report’ in the duty3G configuration console for some examples of at-request duties that have already been defined.
To define a new at-request duty
- Select duty3G configuration.
- From the duty configuration console, select Duty > Add.
Fill in the following fields:
- Duty list
- Enter or choose duty list this duty is to belonf to. The duty console will display the duties grouped by duty list.
- Duty
- Enter a name for the duty. This is the description that will appear in the list of duties to be performed.
- Mode
- Select ‘request’ for the run mode.
- Command
- Type in the command that you want executed. This can be any command or series of commands that could be entered at the shell prompt, including Functional Toolset commands and variables created by duty3G.
- Pause?
- Select ‘yes’ to prompt the user to press Return after the command has executed.
Note | |
'Pause?' only displays if you are using the character based interface (CUI). |
- Run on host
- Choose the host on which the command is to be run. The field defaults to the name of the current host.
Note | |
Duties run on a remote host are executed using rsh, and so can’t be interactive. |
- Application
- If the duty runs under another application such as backup3G, select the required application here. Leave the field blank if no other application needed.
- Run as user
- Select the login ID of the user this command is to be executed under. This should be chosen to give the command the permission needed to perform the task. Use ‘Self ’ if this duty is to be run under the login ID of the user executing the task. The default user ID is ‘root’.
- Access role
- Select the role to which this duty belongs. By convention, the role ‘Other’ is used for duties that are to be given to all users.
- Re-authenticate
- Select 'yes' to prompt the user for their password before running the command.
Press Enabled to define enable options for this duty.
- Enabled?
- Select ‘yes’ if this duty should be enabled now. Disabled duties do not appear in the duty list.
- Enable on
- If the duty is to be disabled temporarily, give a date for the duty to be automatically enabled. Select ‘no’ for Enabled? and leave the Enable on field blank to disable the duty indefinitely.
- Disable on
- If the duty is to be disabled temporarily, give a date for the duty to be automatically disabled.
Press Return.
- Duty notes
- Enter a file name for a text or HTML document containing associated Operator notes for this duty. The file must be stored in
duty_5.1/local/notes
.
Press Accept to finish defining this duty.
Assigning a Duty to a Different Access Role
Operators can only run duties belonging to one of their access roles. You can see which role a duty is assigned to in the duty configuration console.
To assign a duty to a different group of duty3G users:
- Select duty3G configuration.
- Select the duty, then select Duty > Change.
- Move to the By role field, and press Choose. Choose another role.
Press Accept to save the duty.
Adding a Schedule Time
Schedule times define processing cycles for running duties. A schedule time specifies the day and optionally a ‘time window’ or shift during which a duty is scheduled to be run. You choose from this list when defining a scheduled or automatic duty. You can add new schedule times based on your own shifts and processing cycles to the schedule times provided with duty3G.
There are two ways to define schedule times, listing a combination of times or defining a command:
List method
The first method is to list a combination of scheduled days and times in the day, month, and time fields. All the fields must return ‘true’ for the duty to be scheduled – that is, there is a logical AND between the day and month fields and the time period.
This method is more flexible as it lets you specify that a duty must be performed by a particular shift or between certain hours. See Scheduled Duties, Schedule Times and Shifts for more details and examples.
Command method
The other way is to define a schedule command using a command that returns ‘true’ or ‘false’ for the current date, such as db_datemat. Scheduled duties will be displayed only if db_datemat returns ‘true’ for today’s date.
Adding a schedule time using the list method
- Select Tools > Schedules from the duty3G configuration console.
- Select Maintain > Add.
- Order
- Duty3G allocates an order number, by default ten more than the previous highest. The order number determines the order in which the list of outstanding scheduled duties is presented to the user. If you want to keep the new time with a group of similar schedule times, change the order to an available number close to that of the group.
- When
- Enter a descriptive term, consistent with the names displayed in the list of schedule times.
- Schedule command
- Leave blank for date/time matching.
The next three fields control which days a duty will be scheduled. By default the fields return ‘true’ for every day of the month, every month of the year, and every day of the week. You restrict the scheduled days by limiting one or more of the fields to certain values or ranges.
- Day of Month
- Enter a list of days of the month.
Example: first week of the month: 1-7 - Month of Year
- Enter a list of months.
Example: first month of every quarter: 1,4,7,10 - Day of Week
- Enter the days of the week (0 = Sunday, 6 = Saturday)
Example: Monday to Wednesday and Friday: 1-3,5 - Start time, Period length
- By default a duty is scheduled to be done any time on the scheduled day. To restrict this to a shorter period such as an operator shift, enter the start time and a period in hours and minutes.
Example: Specify a schedule time from 10 pm on the scheduled day to 6 am the following day:
Start time 22:00
Period length 08:00 - Comment
- If you wish you can enter a comment about this schedule time.
Press Accept to complete the definition of the schedule time.
Adding a schedule time using the command method
- Select Duty > Schedules from the duty3G configuration console.
- Select Maintain > Add.
- Order
- Duty3G allocates an order number, by default ten more than the previous highest. The order number determines the order in which the list of outstanding scheduled duties is presented to the user. If you want to keep the new time with a group of similar schedule times, change the order to an available number close to that of the group.
- When
- Enter a descriptive name, consistent with the names displayed in the list of schedule times.
- Schedule command
- Enter a command (using db_datemat or similar) which will return ‘true’ only if today’s date is when the duty should be run.
- Comment
- If you wish you can enter a comment about this schedule time.
Press Accept to complete the definition of the schedule time.
Synchronizing crontab
To ensure that the automatic duties in the duty list are correctly replicated in the COSmanager crontab, use Tools > Sync crontab on the duty3G configuration console. Carry out this task if problems are experienced with automatic duties in duty3G which may be caused by inconsistencies between the tables.
On selecting the Sync crontab option, duty3G displays a dialogue box, which indicates what is about to happen and provides the option to exit or to proceed.
Press Accept to synchronize the tables; duty3G will return a message indicating the outcome of the task.
Note | |
This task does not alter the root crontab in any way; the only table amended is the COSmanager crontab. |