mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-16 00:04:31 +08:00
修复定时任务列表下次运行时间
This commit is contained in:
+1
-1
@@ -274,7 +274,7 @@ main() {
|
|||||||
run_concurrent "$1" "$3"
|
run_concurrent "$1" "$3"
|
||||||
;;
|
;;
|
||||||
desi)
|
desi)
|
||||||
run_single "$1" "$3" "$4"
|
run_designated "$1" "$3" "$4"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
run_else "$@"
|
run_else "$@"
|
||||||
|
|||||||
@@ -641,6 +641,10 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
|
|||||||
const handleCrons = (cron: any) => {
|
const handleCrons = (cron: any) => {
|
||||||
const index = value.findIndex((x) => x._id === cron._id);
|
const index = value.findIndex((x) => x._id === cron._id);
|
||||||
const result = [...value];
|
const result = [...value];
|
||||||
|
cron.nextRunTime = cron_parser
|
||||||
|
.parseExpression(cron.schedule)
|
||||||
|
.next()
|
||||||
|
.toDate();
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
result.unshift(cron);
|
result.unshift(cron);
|
||||||
} else {
|
} else {
|
||||||
@@ -657,6 +661,10 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
|
|||||||
.then((data: any) => {
|
.then((data: any) => {
|
||||||
const index = value.findIndex((x) => x._id === cron._id);
|
const index = value.findIndex((x) => x._id === cron._id);
|
||||||
const result = [...value];
|
const result = [...value];
|
||||||
|
data.data.nextRunTime = cron_parser
|
||||||
|
.parseExpression(data.data.schedule)
|
||||||
|
.next()
|
||||||
|
.toDate();
|
||||||
result.splice(index, 1, {
|
result.splice(index, 1, {
|
||||||
...cron,
|
...cron,
|
||||||
...data.data,
|
...data.data,
|
||||||
|
|||||||
Reference in New Issue
Block a user