我们有一个自己编写的Windows服务,我们希望该服务在启动时可以根据用户输入的参数实现不同的功能. 要实现这样的需求并不是很难,下面这个例子我用来示范如何编写该服务 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProce
1.批处理带参数ping命令 @echo offecho Input you IP address ......set /p IP=echo Your IP number is %IP%.ping %IP%set IP=pause 2.发送告警脚本 For counter = 1 To 3 Step 1SendMailNext Public Sub SendMailNameSpace = "http://schemas.microsoft.com/cdo/configuration/"
启动hive命令时指定参数或自定义参数 在hive启动命令中指定一个参数 hive --hiveconf hive.job.submit.username=fuxin.zhao -e "select dt,count(1) from ods.s1_userinfo where dt>='2017-02-01' group by dt;" 在hive启动命令中指定多个参数,这些参数是hive-site.xml中参数,也开始自定义的惨. hive --hiveconf hive.jo