ibmcms调度程序api调用的包装器
easy-icm-runner的Python项目详细描述
简易ICM跑步器:火箭:
使用restapi简化ibmcm v10的作业执行
https://developer.ibm.com/api/view/id-689:title-Incentive_Compensation_Management
安装:
pip install easy-icm-runner
用法:
此项目可以用作自定义程序中的模块,也可以独立于命令行。下面我们演示示例用法:
Python
下面的代码片段演示如何在python代码中同步运行作业。这样的方法对于机密和配置管理,或者对于集成到更复杂的应用程序中是可取的。
fromicm_runnerimportRunnerjob_runner=Runner()# get an authentication token to use in remaining operationsjob_runner.get_token(username='icm username',password='icm password')# start jobactivity_id=job_runner.run_process_by_name(model_name='model name',process_name='process name',follow=True)# poll for status until completejob_runner.monitor_activity(model_name='model name',activity_id=activity_id,interval_mins=0.1)
命令行
对于那些还没有成为pythonistas的人,或者仅仅是在寻找一个简单的作业调度解决方案的人,我们还允许一个命令行入口点。
$ python -m icm_runner -u "icm username" -p "icm password" -m "model name" -j "process name"