ScheduledTaskController接口测试.http 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ### 任务调度==查询全部
  2. POST http://127.0.0.1:22222/common/scheduling/task/scheduled/list/all
  3. Content-Type: application/json
  4. ### 任务调度==查询正在调度的任务
  5. POST http://127.0.0.1:9999/common/scheduling/task/scheduled/list/scheduled
  6. Content-Type: application/json
  7. ### 任务调度==删除
  8. POST http://127.0.0.1:22222/common/scheduling/task/scheduled/delete
  9. Content-Type: application/json
  10. 211537692419297280
  11. ### 任务调度==更新
  12. POST http://127.0.0.1:22222/common/scheduling/task/scheduled/update
  13. Content-Type: application/json
  14. {
  15. "id": 211596024697982976,
  16. "registeredTask": {
  17. "id": 211593346244808704
  18. },
  19. "status": "ON",
  20. "description": "abc"
  21. }
  22. ### 任务调度==新增 1. 新增马上调度
  23. POST http://127.0.0.1:22222/common/scheduling/task/scheduled/add
  24. Content-Type: application/json
  25. {
  26. "registeredTask": {
  27. "id": 211528578876182528
  28. },
  29. "status": "ON",
  30. "scheduledType": "IMMEDIATELY",
  31. "description": "测试用..."
  32. }
  33. ### 2. 新增单次调度
  34. POST http://127.0.0.1:9999/demo/scheduling/task/scheduled/add
  35. Content-Type: application/json
  36. {
  37. "registeredTask": {
  38. "id": 2
  39. },
  40. "status": "ON",
  41. "scheduledType": "ONCE",
  42. "methodParameter": "abc",
  43. "scheduledParameter": {
  44. "startTime": "2023-11-27 17:04:00"
  45. }
  46. }
  47. ### 2. 新增单次调度2
  48. POST http://127.0.0.1:9999/common/scheduling/task/scheduled/add
  49. Content-Type: application/json
  50. {
  51. "registeredTask": {
  52. "id": 213707591296094208
  53. },
  54. "status": "ON",
  55. "scheduledType": "ONCE",
  56. "methodParameter": "abc",
  57. "scheduledParameter": {
  58. "delayOfSeconds": 5
  59. }
  60. }
  61. ### 3. 新增定时调度
  62. POST http://127.0.0.1:22222/common/scheduling/task/scheduled/add
  63. Content-Type: application/json
  64. {
  65. "registeredTask": {
  66. "id": 211593346244808704
  67. },
  68. "status": "ON",
  69. "scheduledType": "CRON",
  70. "scheduledParameter": {
  71. "cronExpression": "0 15 14 * * *"
  72. }
  73. }
  74. ### 4. 新增周期调度
  75. POST http://127.0.0.1:9999/demo/scheduling/task/scheduled/add
  76. Content-Type: application/json
  77. {
  78. "registeredTask": {
  79. "id": 1
  80. },
  81. "status": "ON",
  82. "scheduledType": "INTERVAL",
  83. "scheduledParameter": {
  84. "periodOfSeconds": 15
  85. }
  86. }
  87. ### 5. 新增固定延时调度
  88. POST http://127.0.0.1:9999/common/scheduling/task/scheduled/add
  89. Content-Type: application/json
  90. {
  91. "registeredTask": {
  92. "id": 213707591296094208
  93. },
  94. "status": "ON",
  95. "scheduledType": "FIXED_DELAY",
  96. "scheduledParameter": {
  97. "delayOfSeconds": 15
  98. }
  99. }