JobScheduler is similar to JP1. But, JobScheduler is OSS. Everyone is able to be available freely.
Last time, I succeded installing JobScheduler. This time, I try basic function.
Enviroment
- Sakura VPS centos6.5
- mysql(installed)
- java1.7(installed)
launch, stop, restart, status.
#起動 {installpath}/scheduler/bin/jobscheduler.sh start #停止 {installpath}/scheduler/bin/jobscheduler.sh stop #再起動 {installpath}/scheduler/bin/jobscheduler.sh restart #状況 {installpath}/scheduler/bin/jobscheduler.sh status
if you don't understand {installpath}, you can find scheduler_install.xml.
Language change
vi {installpath}/scheduler/scheduler_data/config/operations_gui/custom.js // change japanese _sos_lang = 'ja'; // browser update
lang file is js.
Execute Job
cd {installpath}/scheduler/scheduler_data/config/live // create {jobname}.job.xml touch sample_test1.job.xml <?xml version="1.0" encoding="ISO-8859-1"?> <job > <script language="shell"> <![CDATA[ #!/bin/sh LANG=C echo "$SCHEDULER_JOB_NAME is running" echo "now - `date`" exit $? ]]> </script> </job> // browser update // タスク即時実行 // log sample_test1 is running now - Mon Apr 6 17:15:38 JST 2015
Execute Time Scheduled Job
- ジョブメニュー選択
- タスク実行時刻設定
- カレンダーで日付と時刻を選択してOKをクリック
Execute Job Chain
cd {installpath}/scheduler/scheduler_data/config/live // create {jobname}.job_chain.xml touch sample_chain_test1.job_chain.xml <?xml version="1.0" encoding="iso-8859-1"?> <job_chain> <job_chain_node state="100" job="first" next_state="200" error_state="error"/> <job_chain_node state="200" job="second" next_state="300" error_state="error"/> <job_chain_node state="300" job="last" next_state="success" error_state="error"/> <job_chain_node state="error"/> <job_chain_node state="success"/> </job_chain> // create {jobname}.job.xml touch first.job.xml <?xml version="1.0" encoding="ISO-8859-1"?> <job > <script language="shell"> <![CDATA[ #!/bin/sh LANG=C echo "first job" exit $? ]]> </script> </job> // create {jobname}.job.xml touch second.job.xml <?xml version="1.0" encoding="ISO-8859-1"?> <job > <script language="shell"> <![CDATA[ #!/bin/sh LANG=C echo "second job" exit $? ]]> </script> </job> // create {jobname}.job.xml touch last.job.xml <?xml version="1.0" encoding="ISO-8859-1"?> <job > <script language="shell"> <![CDATA[ #!/bin/sh LANG=C echo "last job" exit $? ]]> </script> </job>
Execute Order
- ジョブチェーンメニュー選択
- オーダー作成
- 項目を全て設定してOKをクリック
Thanks
0 件のコメント:
コメントを投稿