xxl_job_postgres.sql 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. CREATE SEQUENCE "xxl_job_group_id_seq"
  2. INCREMENT 1
  3. MINVALUE 1
  4. MAXVALUE 2147483647
  5. START 1
  6. CACHE 1;
  7. SELECT setval('"xxl_job_group_id_seq"', 2, true);
  8. CREATE SEQUENCE "xxl_job_info_id_seq"
  9. INCREMENT 1
  10. MINVALUE 1
  11. MAXVALUE 2147483647
  12. START 1
  13. CACHE 1;
  14. SELECT setval('"xxl_job_info_id_seq"', 8, true);
  15. CREATE SEQUENCE "xxl_job_log_id_seq"
  16. INCREMENT 1
  17. MINVALUE 1
  18. MAXVALUE 2147483647
  19. START 1
  20. CACHE 1;
  21. CREATE SEQUENCE "xxl_job_logglue_id_seq"
  22. INCREMENT 1
  23. MINVALUE 1
  24. MAXVALUE 2147483647
  25. START 1
  26. CACHE 1;
  27. CREATE SEQUENCE "xxl_job_log_report_id_seq"
  28. INCREMENT 1
  29. MINVALUE 1
  30. MAXVALUE 2147483647
  31. START 1
  32. CACHE 1;
  33. CREATE SEQUENCE "xxl_job_registry_id_seq"
  34. INCREMENT 1
  35. MINVALUE 1
  36. MAXVALUE 2147483647
  37. START 1
  38. CACHE 1;
  39. CREATE SEQUENCE "xxl_job_user_id_seq"
  40. INCREMENT 1
  41. MINVALUE 1
  42. MAXVALUE 2147483647
  43. START 1
  44. CACHE 1;
  45. SELECT setval('"xxl_job_user_id_seq"', 2, true);
  46. CREATE TABLE "xxl_job_group" (
  47. "id" int4 NOT NULL DEFAULT nextval('xxl_job_group_id_seq'::regclass),
  48. "app_name" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  49. "title" varchar(12) COLLATE "pg_catalog"."default" NOT NULL,
  50. "address_type" int2 NOT NULL,
  51. "address_list" text COLLATE "pg_catalog"."default",
  52. "update_time" timestamp(6)
  53. )
  54. ;
  55. COMMENT ON COLUMN "xxl_job_group"."app_name" IS '执行器AppName';
  56. COMMENT ON COLUMN "xxl_job_group"."title" IS '执行器名称';
  57. COMMENT ON COLUMN "xxl_job_group"."address_type" IS '执行器地址类型:0=自动注册、1=手动录入';
  58. COMMENT ON COLUMN "xxl_job_group"."address_list" IS '执行器地址列表,多地址逗号分隔';
  59. CREATE TABLE "xxl_job_info" (
  60. "id" int4 NOT NULL DEFAULT nextval('xxl_job_info_id_seq'::regclass),
  61. "job_group" int4 NOT NULL,
  62. "job_desc" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  63. "add_time" timestamp(6),
  64. "update_time" timestamp(6),
  65. "author" varchar(64) COLLATE "pg_catalog"."default",
  66. "alarm_email" varchar(255) COLLATE "pg_catalog"."default",
  67. "schedule_type" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  68. "schedule_conf" varchar(128) COLLATE "pg_catalog"."default",
  69. "misfire_strategy" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  70. "executor_route_strategy" varchar(50) COLLATE "pg_catalog"."default",
  71. "executor_handler" varchar(255) COLLATE "pg_catalog"."default",
  72. "executor_param" varchar(512) COLLATE "pg_catalog"."default",
  73. "executor_block_strategy" varchar(50) COLLATE "pg_catalog"."default",
  74. "executor_timeout" int4 NOT NULL,
  75. "executor_fail_retry_count" int4 NOT NULL,
  76. "glue_type" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  77. "glue_source" text COLLATE "pg_catalog"."default",
  78. "glue_remark" varchar(128) COLLATE "pg_catalog"."default",
  79. "glue_updatetime" timestamp(6),
  80. "child_jobid" varchar(255) COLLATE "pg_catalog"."default",
  81. "trigger_status" int2 NOT NULL,
  82. "trigger_last_time" int8 NOT NULL,
  83. "trigger_next_time" int8 NOT NULL
  84. )
  85. ;
  86. COMMENT ON COLUMN "xxl_job_info"."job_group" IS '执行器主键ID';
  87. COMMENT ON COLUMN "xxl_job_info"."author" IS '作者';
  88. COMMENT ON COLUMN "xxl_job_info"."alarm_email" IS '报警邮件';
  89. COMMENT ON COLUMN "xxl_job_info"."schedule_type" IS '调度类型';
  90. COMMENT ON COLUMN "xxl_job_info"."schedule_conf" IS '调度配置,值含义取决于调度类型';
  91. COMMENT ON COLUMN "xxl_job_info"."misfire_strategy" IS '调度过期策略';
  92. COMMENT ON COLUMN "xxl_job_info"."executor_route_strategy" IS '执行器路由策略';
  93. COMMENT ON COLUMN "xxl_job_info"."executor_handler" IS '执行器任务handler';
  94. COMMENT ON COLUMN "xxl_job_info"."executor_param" IS '执行器任务参数';
  95. COMMENT ON COLUMN "xxl_job_info"."executor_block_strategy" IS '阻塞处理策略';
  96. COMMENT ON COLUMN "xxl_job_info"."executor_timeout" IS '任务执行超时时间,单位秒';
  97. COMMENT ON COLUMN "xxl_job_info"."executor_fail_retry_count" IS '失败重试次数';
  98. COMMENT ON COLUMN "xxl_job_info"."glue_type" IS 'GLUE类型';
  99. COMMENT ON COLUMN "xxl_job_info"."glue_source" IS 'GLUE源代码';
  100. COMMENT ON COLUMN "xxl_job_info"."glue_remark" IS 'GLUE备注';
  101. COMMENT ON COLUMN "xxl_job_info"."glue_updatetime" IS 'GLUE更新时间';
  102. COMMENT ON COLUMN "xxl_job_info"."child_jobid" IS '子任务ID,多个逗号分隔';
  103. COMMENT ON COLUMN "xxl_job_info"."trigger_status" IS '调度状态:0-停止,1-运行';
  104. COMMENT ON COLUMN "xxl_job_info"."trigger_last_time" IS '上次调度时间';
  105. COMMENT ON COLUMN "xxl_job_info"."trigger_next_time" IS '下次调度时间';
  106. CREATE TABLE "xxl_job_lock" (
  107. "lock_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL
  108. )
  109. ;
  110. COMMENT ON COLUMN "xxl_job_lock"."lock_name" IS '锁名称';
  111. CREATE TABLE "xxl_job_log" (
  112. "id" int4 NOT NULL DEFAULT nextval('xxl_job_log_id_seq'::regclass),
  113. "job_group" int4 NOT NULL,
  114. "job_id" int4 NOT NULL,
  115. "executor_address" varchar(255) COLLATE "pg_catalog"."default",
  116. "executor_handler" varchar(255) COLLATE "pg_catalog"."default",
  117. "executor_param" varchar(512) COLLATE "pg_catalog"."default",
  118. "executor_sharding_param" varchar(20) COLLATE "pg_catalog"."default",
  119. "executor_fail_retry_count" int4 NOT NULL DEFAULT 0,
  120. "trigger_time" timestamp(6),
  121. "trigger_code" int4 NOT NULL,
  122. "trigger_msg" text COLLATE "pg_catalog"."default",
  123. "handle_time" timestamp(6),
  124. "handle_code" int4 NOT NULL,
  125. "handle_msg" text COLLATE "pg_catalog"."default",
  126. "alarm_status" int2 NOT NULL DEFAULT 0
  127. )
  128. ;
  129. COMMENT ON COLUMN "xxl_job_log"."job_group" IS '执行器主键ID';
  130. COMMENT ON COLUMN "xxl_job_log"."job_id" IS '任务,主键ID';
  131. COMMENT ON COLUMN "xxl_job_log"."executor_address" IS '执行器地址,本次执行的地址';
  132. COMMENT ON COLUMN "xxl_job_log"."executor_handler" IS '执行器任务handler';
  133. COMMENT ON COLUMN "xxl_job_log"."executor_param" IS '执行器任务参数';
  134. COMMENT ON COLUMN "xxl_job_log"."executor_sharding_param" IS '执行器任务分片参数,格式如 1/2';
  135. COMMENT ON COLUMN "xxl_job_log"."executor_fail_retry_count" IS '失败重试次数';
  136. COMMENT ON COLUMN "xxl_job_log"."trigger_time" IS '调度-时间';
  137. COMMENT ON COLUMN "xxl_job_log"."trigger_code" IS '调度-结果';
  138. COMMENT ON COLUMN "xxl_job_log"."trigger_msg" IS '调度-日志';
  139. COMMENT ON COLUMN "xxl_job_log"."handle_time" IS '执行-时间';
  140. COMMENT ON COLUMN "xxl_job_log"."handle_code" IS '执行-状态';
  141. COMMENT ON COLUMN "xxl_job_log"."handle_msg" IS '执行-日志';
  142. COMMENT ON COLUMN "xxl_job_log"."alarm_status" IS '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败';
  143. CREATE TABLE "xxl_job_log_report" (
  144. "id" int4 NOT NULL DEFAULT nextval('xxl_job_log_report_id_seq'::regclass),
  145. "trigger_day" timestamp(6),
  146. "running_count" int4 NOT NULL,
  147. "suc_count" int4 NOT NULL,
  148. "fail_count" int4 NOT NULL,
  149. "update_time" timestamp(6)
  150. )
  151. ;
  152. COMMENT ON COLUMN "xxl_job_log_report"."trigger_day" IS '调度-时间';
  153. COMMENT ON COLUMN "xxl_job_log_report"."running_count" IS '运行中-日志数量';
  154. COMMENT ON COLUMN "xxl_job_log_report"."suc_count" IS '执行成功-日志数量';
  155. COMMENT ON COLUMN "xxl_job_log_report"."fail_count" IS '执行失败-日志数量';
  156. CREATE TABLE "xxl_job_logglue" (
  157. "id" int4 NOT NULL DEFAULT nextval('xxl_job_logglue_id_seq'::regclass),
  158. "job_id" int4 NOT NULL,
  159. "glue_type" varchar(50) COLLATE "pg_catalog"."default",
  160. "glue_source" text COLLATE "pg_catalog"."default",
  161. "glue_remark" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  162. "add_time" timestamp(6),
  163. "update_time" timestamp(6)
  164. )
  165. ;
  166. COMMENT ON COLUMN "xxl_job_logglue"."job_id" IS '任务,主键ID';
  167. COMMENT ON COLUMN "xxl_job_logglue"."glue_type" IS 'GLUE类型';
  168. COMMENT ON COLUMN "xxl_job_logglue"."glue_source" IS 'GLUE源代码';
  169. COMMENT ON COLUMN "xxl_job_logglue"."glue_remark" IS 'GLUE备注';
  170. CREATE TABLE "xxl_job_registry" (
  171. "id" int4 NOT NULL DEFAULT nextval('xxl_job_registry_id_seq'::regclass),
  172. "registry_group" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  173. "registry_key" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  174. "registry_value" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  175. "update_time" timestamp(6)
  176. )
  177. ;
  178. CREATE TABLE "xxl_job_user" (
  179. "id" int4 NOT NULL DEFAULT nextval('xxl_job_user_id_seq'::regclass),
  180. "username" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  181. "password" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  182. "role" int2 NOT NULL,
  183. "permission" varchar(255) COLLATE "pg_catalog"."default"
  184. )
  185. ;
  186. COMMENT ON COLUMN "xxl_job_user"."username" IS '账号';
  187. COMMENT ON COLUMN "xxl_job_user"."password" IS '密码';
  188. COMMENT ON COLUMN "xxl_job_user"."role" IS '角色:0-普通用户、1-管理员';
  189. COMMENT ON COLUMN "xxl_job_user"."permission" IS '权限:执行器ID列表,多个逗号分割';
  190. ALTER TABLE "xxl_job_group" ADD CONSTRAINT "xxl_job_group_pkey" PRIMARY KEY ("id");
  191. ALTER TABLE "xxl_job_info" ADD CONSTRAINT "xxl_job_info_pkey" PRIMARY KEY ("id");
  192. ALTER TABLE "xxl_job_lock" ADD CONSTRAINT "xxl_job_lock_pkey" PRIMARY KEY ("lock_name");
  193. CREATE INDEX "I_handle_code" ON "xxl_job_log" USING btree (
  194. "handle_code" "pg_catalog"."int4_ops" ASC NULLS LAST
  195. );
  196. CREATE INDEX "I_trigger_time" ON "xxl_job_log" USING btree (
  197. "trigger_time" "pg_catalog"."timestamp_ops" ASC NULLS LAST
  198. );
  199. ALTER TABLE "xxl_job_log" ADD CONSTRAINT "xxl_job_log_pkey" PRIMARY KEY ("id");
  200. CREATE INDEX "i_trigger_day" ON "xxl_job_log_report" USING btree (
  201. "trigger_day" "pg_catalog"."timestamp_ops" ASC NULLS LAST
  202. );
  203. ALTER TABLE "xxl_job_log_report" ADD CONSTRAINT "xxl_job_log_report_pkey" PRIMARY KEY ("id");
  204. ALTER TABLE "xxl_job_logglue" ADD CONSTRAINT "xxl_job_logglue_pkey" PRIMARY KEY ("id");
  205. CREATE INDEX "i_g_k_v" ON "xxl_job_registry" USING btree (
  206. "registry_group" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  207. "registry_key" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  208. "registry_value" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
  209. );
  210. ALTER TABLE "xxl_job_registry" ADD CONSTRAINT "xxl_job_registry_pkey" PRIMARY KEY ("id");
  211. CREATE INDEX "i_username" ON "xxl_job_user" USING btree (
  212. "username" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
  213. );
  214. ALTER TABLE "xxl_job_user" ADD CONSTRAINT "xxl_job_user_pkey" PRIMARY KEY ("id");
  215. INSERT INTO "xxl_job_user" ("id", "username", "password", "role", "permission") VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, NULL);
  216. INSERT INTO "xxl_job_group" ("id", "app_name", "title", "address_type", "address_list", "update_time") VALUES (1, 'xxl-job-executor', '执行器-测试组', 0, NULL, '2022-06-05 22:21:31');
  217. INSERT INTO "xxl_job_info" ("id", "job_group", "job_desc", "add_time", "update_time", "author", "alarm_email", "schedule_type", "schedule_conf", "misfire_strategy", "executor_route_strategy", "executor_handler", "executor_param", "executor_block_strategy", "executor_timeout", "executor_fail_retry_count", "glue_type", "glue_source", "glue_remark", "glue_updatetime", "child_jobid", "trigger_status", "trigger_last_time", "trigger_next_time") VALUES (1, 1, 'java_script', '2022-06-07 01:48:38.21', '2022-06-07 01:57:43.739', 'zhangsan', '', 'CRON', '0/5 * * * * ?', 'DO_NOTHING', 'FIRST', '', 'https://api.vvhan.com/api/zhihu?username=uxiaohan', 'SERIAL_EXECUTION', 0, 0, 'GLUE_GROOVY', 'package com.xxl.job.service.handler;
  218. import com.xxl.job.core.context.XxlJobHelper;
  219. import com.xxl.job.core.handler.IJobHandler;
  220. import java.io.BufferedInputStream;
  221. import java.io.BufferedReader;
  222. import java.io.DataOutputStream;
  223. import java.io.InputStreamReader;
  224. import java.net.HttpURLConnection;
  225. import java.net.URL;
  226. import java.net.URLConnection;
  227. import java.util.Arrays;
  228. import java.util.concurrent.TimeUnit;
  229. public class HttpJobHandler extends IJobHandler {
  230. public static String sendGet(String url, String param) throws Exception{
  231. String result = "";
  232. String urlNameString = url + "?" + param;
  233. URL realUrl = new URL(urlNameString);
  234. // 打开和URL之间的连接
  235. URLConnection connection = realUrl.openConnection();
  236. // 设置通用的请求属性
  237. connection.setRequestProperty("accept", "*/*");
  238. connection.setRequestProperty("connection", "Keep-Alive");
  239. connection.setRequestProperty("user-agent",
  240. "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
  241. // 建立实际的连接
  242. connection.setRequestProperty("Accept-Charset", "utf-8");
  243. connection.setRequestProperty("contentType", "utf-8");
  244. connection.connect();
  245. BufferedReader inbf = new BufferedReader(new InputStreamReader(
  246. connection.getInputStream(),"utf-8"));
  247. String line;
  248. while ((line = inbf.readLine()) != null) {
  249. result += line;
  250. }
  251. inbf.close();
  252. return result;
  253. }
  254. @Override
  255. public void execute() throws Exception {
  256. XxlJobHelper.log("开始执行模拟请求!");
  257. XxlJobHelper.log("接收到的参数:{}", XxlJobHelper.getJobParam());
  258. // 分片参数
  259. int shardIndex = XxlJobHelper.getShardIndex();
  260. int shardTotal = XxlJobHelper.getShardTotal();
  261. XxlJobHelper.log("分片参数:当前分片序号 = {}, 总分片数 = {}", shardIndex, shardTotal);
  262. //获取调度器传递参数
  263. String url = XxlJobHelper.getJobParam();
  264. XxlJobHelper.log(sendGet(url,""));
  265. XxlJobHelper.log("模拟请求执行完成");
  266. }
  267. }', 'java_script', '2022-06-07 01:57:43.739', '', 0, 0, 0);
  268. INSERT INTO "xxl_job_info" ("id", "job_group", "job_desc", "add_time", "update_time", "author", "alarm_email", "schedule_type", "schedule_conf", "misfire_strategy", "executor_route_strategy", "executor_handler", "executor_param", "executor_block_strategy", "executor_timeout", "executor_fail_retry_count", "glue_type", "glue_source", "glue_remark", "glue_updatetime", "child_jobid", "trigger_status", "trigger_last_time", "trigger_next_time") VALUES (2, 1, 'php_script', '2022-06-07 01:49:08.833', '2022-06-07 02:02:08.743', 'zhangsan', '', 'CRON', '0/5 * * * * ?', 'DO_NOTHING', 'FIRST', '', 'https://api.vvhan.com/api/zhihu?username=uxiaohan', 'SERIAL_EXECUTION', 0, 0, 'GLUE_PHP', '<?php
  269. echo "xxl-job: hello php \n";
  270. echo "脚本位置:$argv[0] \n";
  271. echo "任务参数:$argv[1] \n";
  272. echo "分片序号 = $argv[2] \n";
  273. echo "分片总数 = $argv[3] \n";
  274. /**
  275. * 传入json数据进行HTTP Get请求
  276. *
  277. * @param string $url $data_string
  278. * @return string
  279. */
  280. function http_get($url)
  281. {
  282. $curl = curl_init(); // 启动一个CURL会话
  283. curl_setopt($curl, CURLOPT_URL, $url);
  284. curl_setopt($curl, CURLOPT_HEADER, 0);
  285. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  286. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // 跳过证书检查
  287. curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); // 从证书中检查SSL加密算法是否存在
  288. $tmpInfo = curl_exec($curl); //返回api的json对象
  289. //关闭URL请求
  290. curl_close($curl);
  291. return $tmpInfo; //返回json对象
  292. }
  293. $url=$argv[1];
  294. $result=http_get($url);
  295. echo $result;
  296. echo "Good bye! \n";
  297. exit(0);
  298. ?>
  299. ', 'php_script', '2022-06-07 02:02:08.743', '', 0, 0, 0);
  300. INSERT INTO "xxl_job_info" ("id", "job_group", "job_desc", "add_time", "update_time", "author", "alarm_email", "schedule_type", "schedule_conf", "misfire_strategy", "executor_route_strategy", "executor_handler", "executor_param", "executor_block_strategy", "executor_timeout", "executor_fail_retry_count", "glue_type", "glue_source", "glue_remark", "glue_updatetime", "child_jobid", "trigger_status", "trigger_last_time", "trigger_next_time") VALUES (3, 1, 'python_script', '2022-06-07 01:49:40.531', '2022-06-07 02:04:03.534', 'zhangsan', '', 'CRON', '0/5 * * * * ?', 'DO_NOTHING', 'FIRST', '', 'https://api.vvhan.com/api/zhihu?username=uxiaohan', 'SERIAL_EXECUTION', 0, 0, 'GLUE_PYTHON', '#!/usr/bin/python
  301. # -*- coding: UTF-8 -*-
  302. import time
  303. import urllib.request
  304. import urllib.parse
  305. import sys
  306. import codecs
  307. sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
  308. print("xxl-job: hello python")
  309. print("脚本位置:", sys.argv[0])
  310. print("任务参数:", sys.argv[1])
  311. print("分片序号:", sys.argv[2])
  312. print("分片总数:", sys.argv[3])
  313. def gethttp(http_url):
  314. print(http_url)
  315. response = urllib.request.urlopen(http_url)
  316. result=response.read()
  317. print(result)
  318. pass
  319. gethttp(sys.argv[1])
  320. print ("Good bye!")
  321. exit(0)
  322. ', 'python_script', '2022-06-07 02:04:03.534', '', 0, 0, 0);
  323. INSERT INTO "xxl_job_info" ("id", "job_group", "job_desc", "add_time", "update_time", "author", "alarm_email", "schedule_type", "schedule_conf", "misfire_strategy", "executor_route_strategy", "executor_handler", "executor_param", "executor_block_strategy", "executor_timeout", "executor_fail_retry_count", "glue_type", "glue_source", "glue_remark", "glue_updatetime", "child_jobid", "trigger_status", "trigger_last_time", "trigger_next_time") VALUES (5, 1, 'spring_bean_simple', '2022-06-07 01:53:28.497', '2022-06-07 01:53:28.497', 'zhangsan', '', 'CRON', '0/5 * * * * ?', 'DO_NOTHING', 'FIRST', 'demoJobHandler', 'test', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化', '2022-06-07 01:53:28.497', '', 0, 0, 0);
  324. INSERT INTO "xxl_job_info" ("id", "job_group", "job_desc", "add_time", "update_time", "author", "alarm_email", "schedule_type", "schedule_conf", "misfire_strategy", "executor_route_strategy", "executor_handler", "executor_param", "executor_block_strategy", "executor_timeout", "executor_fail_retry_count", "glue_type", "glue_source", "glue_remark", "glue_updatetime", "child_jobid", "trigger_status", "trigger_last_time", "trigger_next_time") VALUES (6, 1, 'spring_bean_broadcast', '2022-06-07 01:54:45.836', '2022-06-07 01:54:59.474', 'zhangsan', '', 'FIX_RATE', '5', 'DO_NOTHING', 'SHARDING_BROADCAST', 'shardingJobHandler', '2022-06-01', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化', '2022-06-07 01:54:45.836', '', 0, 0, 0);
  325. INSERT INTO "xxl_job_info" ("id", "job_group", "job_desc", "add_time", "update_time", "author", "alarm_email", "schedule_type", "schedule_conf", "misfire_strategy", "executor_route_strategy", "executor_handler", "executor_param", "executor_block_strategy", "executor_timeout", "executor_fail_retry_count", "glue_type", "glue_source", "glue_remark", "glue_updatetime", "child_jobid", "trigger_status", "trigger_last_time", "trigger_next_time") VALUES (7, 1, 'shell_script', '2022-06-07 01:50:13.086', '2022-06-07 02:05:11.828', 'zhangsan', '', 'CRON', '0/5 * * * * ?', 'DO_NOTHING', 'FIRST', '', 'https://api.vvhan.com/api/zhihu?username=uxiaohan', 'SERIAL_EXECUTION', 0, 0, 'GLUE_SHELL', '#!/bin/bash
  326. echo "xxl-job: hello shell"
  327. echo "脚本位置:$0"
  328. echo "任务参数:$1"
  329. echo "分片序号 = $2"
  330. echo "分片总数 = $3"
  331. echo "开始HTTP模拟请求"
  332. url=$1
  333. result=$(curl ${url} -s)
  334. echo $result
  335. echo "Good bye!"
  336. exit 0
  337. ', 'shell_script', '2022-06-07 02:05:11.828', '', 0, 0, 0);
  338. INSERT INTO "xxl_job_info" ("id", "job_group", "job_desc", "add_time", "update_time", "author", "alarm_email", "schedule_type", "schedule_conf", "misfire_strategy", "executor_route_strategy", "executor_handler", "executor_param", "executor_block_strategy", "executor_timeout", "executor_fail_retry_count", "glue_type", "glue_source", "glue_remark", "glue_updatetime", "child_jobid", "trigger_status", "trigger_last_time", "trigger_next_time") VALUES (8, 1, 'node_script', '2022-06-07 01:51:43.617', '2022-06-07 02:06:47.131', 'zhangsan', '', 'CRON', '0/5 * * * * ?', 'DO_NOTHING', 'FIRST', '', 'https://api.vvhan.com/api/zhihu?username=uxiaohan', 'SERIAL_EXECUTION', 0, 0, 'GLUE_NODEJS', '#!/usr/bin/env node
  339. console.log("xxl-job: hello nodejs")
  340. var arguments = process.argv
  341. console.log("脚本位置: " + arguments[1])
  342. console.log("任务参数: " + arguments[2])
  343. console.log("分片序号: " + arguments[3])
  344. console.log("分片总数: " + arguments[4])
  345. let name="张三";
  346. console.log(`我是${name}`);
  347. console.log("Good bye!")
  348. process.exit(0)
  349. ', 'node_script', '2022-06-07 02:06:34.115', '', 0, 0, 0);
  350. INSERT INTO "xxl_job_lock" ("lock_name") VALUES ('schedule_lock');