Register the configuration baseline creation.schedule.
For Windows, register the following program with the Task Scheduler:
For Linux, add the following program to cron. Refer to the cron manuals for information on cron.
[Program]
[Windows]
%SWCFMGM_INSTALL_PATH%\CMDB\FJSVcmdbm\bin\snapcreate.exe |
[Linux]
/opt/FJSVcfmgm/CMDB/FJSVcmdbm/bin/snapcreate.sh |
[Options]
-q |
[Windows]
The following example shows how to register a schedule with the Task Scheduler:
Log in to Windows using an account that belongs to the Administrators group.
Select Start >> Administrative Tools >> Task Scheduler.
The Task Scheduler window will be displayed.
Select Action >> Create Task.
The Create New window will be displayed.
Enter a task name in the Name field in the General tab, and then select Run whether user is logged on or not.
Select the Triggers tab, and then click the New button.
The New Trigger window will be displayed.
Register the configuration baseline creation schedule.
Select the Actions tab, and then click the New button.
The New Action window will be displayed.
Configure the following settings:
Select Start a program from the Action pull-down menu.
Add the following command to the Program/script field:
%SWCFMGM_INSTALL_PATH%\CMDB\FJSVcmdbm\bin\snapcreate.exe |
Add the following argument to the Add arguments (optional) field:
-q |
Click the OK button in the Create Task window.
The following window will be displayed:
Enter the user name for an account belonging to the Administrators group and the corresponding password, and then click the OK button.
[Linux]
The following example shows how to register the program with cron:
Perform the following procedure as the root user:
Check that the cron service has started
> service crond status crond (pid xxx) is running...
If the cron service is not running, use the following command to start the cron service:
> service crond start Starting crond:
Point
The cron service normally starts when the operating system starts.
By executing the following command, it is possible to check whether the cron service has been set to start when the operating system starts:
Red Hat Enterprise Linux 6
>chkconfig --list crond crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
If the cron service has been set to start when the operating system starts, the numbers 2, 3, 4 and 5 above are set to "on" as shown above.
To set the cron service to start when the operating system starts, execute the following command:
>chkconfig --level 2345 crond on
Red Hat Enterprise Linux 7
>systemctl list-unit-files crond.service UNIT FILE STATE crond.service enabled
If the cron service has been set to start when the operating system starts, "STATE" is set to "enabled" as shown above.
To set the cron service to start when the operating system starts, execute the following command:
>systemctl enable crond.service
Execute the following command to edit the schedule definitions:
>crontab -e
Executing the "crontab -e" command starts the vi editor. Refer to the vi editor manuals for information on the vi editor.
Example: Creating a configuration baseline every Monday at 6:00
0 6 * * 1 /opt/FJSVcfmgm/CMDB/FJSVcmdbm/bin/snapcreate.sh -q > /dev/null 2>&1
Note
Set up a schedule so that configuration baselines are created no more than once a week.
Take care that the configuration baseline creation schedule does not conflict with the regular discovery schedule. If the creation of a configuration baseline conflicts with the execution of regular discovery, the configuration baseline will not be created correctly.