免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1456 | 回复: 0
打印 上一主题 下一主题

Job Scheduler 学习笔记 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-26 10:23 |只看该作者 |倒序浏览


  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
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP