- 论坛徽章:
- 0
|
Normal
0
7.8 磅
0
2
false
false
false
MicrosoftInternetExplorer4
st1\:*{behavior:url(#ieooui) }
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
Job Scheduler 学习笔记
一、安装
1、本文采用的是scheduler_win32.1.3.5,下载地址http://www.sos-berlin.com/download/scheduler_win32.1.3.5.zip。
2、数据库采用的是oracle10g,首先建立个用户如jobschedule。
3、安装时注意选择oracle,输入正确的oracle连接即可。
4、测试http://127.0.0.1:4444
二、使用说明
1、使用job schedule editor创建hot folder element ->job,然后将job存放到installpath/config/live下。(这种job不用重启job schedule server即可)
2、另外一种方法是编辑installpath/config/scheduler.xml文件。
三、例子
1、 Automatic Scheduled Execution of a Shell Script
This example job for the my_shell_script
script is configured as follows:
*
for an automatic start every 30 minutes (the job will be run 1800 seconds after
the previous run has been completed), weekdays between 9 and 12 o'clock
*
and for manual starts between 8:00 & 20:00 every day.
*
The job starts the ./jobs/my_shell_script.sh shell script.
*
Note that the scheduling can be combined with directory monitoring. This is
described in Example 2 below.
The job is added to the
./config/scheduler.xml configuration file in the form of a job element as
follows:
...
=
"jobs/my_shell_script.sh"
param = "">
end =
"20:00">
2、Program Execution
In this example a MySQL database Windows
Service will be restarted at 4:00 am by way of two jobs.
*
The first service_stop job stops and the second service_start job starts the
Windows service.
The Windows own net.exe program is used for both jobs.
This program lies in a sub-directory of the Windows system32 directory.
The Windows %windir% enviroment variable can be used for this path.
Note that enviroment variables can also be designated on Windows systems
using "$".
*
The MySQL database service name is "MySQL". Additionally, jobs cannot
be manually started.
*
Note also that in this example it would actually be better to use a shell
script, in order to catch errors.
The job is added to the
./config/scheduler.xml configuration file in the form of a job element as
follows:
...
=
"$windir\system32\net.exe"
param = "stop MySQL">
=
"$windir\system32\net.exe"
param = "start MySQL">
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/13625/showart_1844029.html |
|