mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-13 18:15:31 +08:00
parent
ff549a4793
commit
05e62a6f94
3 changed files with 12 additions and 14 deletions
|
@ -827,12 +827,12 @@ const message = {
|
|||
perMonth: '每月',
|
||||
perWeek: '每周',
|
||||
perHour: '每小時',
|
||||
perNDay: '每隔 N 日',
|
||||
perNDay: '每 N 日',
|
||||
perDay: '每天',
|
||||
perNHour: '每隔 N 時',
|
||||
perNMinute: '每隔 N 分鐘',
|
||||
perNSecond: '每隔 N 秒',
|
||||
per: '每隔',
|
||||
perNHour: '每 N 時',
|
||||
perNMinute: '每 N 分鐘',
|
||||
perNSecond: '每 N 秒',
|
||||
per: '每',
|
||||
handle: '執行',
|
||||
day: '日',
|
||||
monday: '周一',
|
||||
|
|
|
@ -828,12 +828,12 @@ const message = {
|
|||
perMonth: '每月',
|
||||
perWeek: '每周',
|
||||
perHour: '每小时',
|
||||
perNDay: '每隔 N 日',
|
||||
perNDay: '每 N 日',
|
||||
perDay: '每天',
|
||||
perNHour: '每隔 N 时',
|
||||
perNMinute: '每隔 N 分钟',
|
||||
perNSecond: '每隔 N 秒',
|
||||
per: '每隔',
|
||||
perNHour: '每 N 时',
|
||||
perNMinute: '每 N 分钟',
|
||||
perNSecond: '每 N 秒',
|
||||
per: '每',
|
||||
handle: '执行',
|
||||
day: '日',
|
||||
monday: '周一',
|
||||
|
|
|
@ -92,12 +92,10 @@ export function transObjToSpec(specType: string, week, day, hour, minute, second
|
|||
case 'perWeek':
|
||||
return `${minute} ${hour} * * ${week}`;
|
||||
case 'perNDay':
|
||||
day = Number(day) + 1 + '';
|
||||
return `${minute} ${hour} */${day} * *`;
|
||||
case 'perDay':
|
||||
return `${minute} ${hour} * * *`;
|
||||
case 'perNHour':
|
||||
hour = Number(hour) + 1 + '';
|
||||
return `${minute} */${hour} * * *`;
|
||||
case 'perHour':
|
||||
return `${minute} * * * *`;
|
||||
|
@ -141,13 +139,13 @@ export function transSpecToObj(spec: string) {
|
|||
}
|
||||
if (specs[1].indexOf('*/') !== -1) {
|
||||
specItem.specType = 'perNHour';
|
||||
specItem.hour = Number(specs[1].replaceAll('*/', '')) - 1;
|
||||
specItem.hour = Number(specs[1].replaceAll('*/', ''));
|
||||
return specItem;
|
||||
}
|
||||
specItem.hour = Number(specs[1]);
|
||||
if (specs[2].indexOf('*/') !== -1) {
|
||||
specItem.specType = 'perNDay';
|
||||
specItem.day = Number(specs[2].replaceAll('*/', '')) - 1;
|
||||
specItem.day = Number(specs[2].replaceAll('*/', ''));
|
||||
return specItem;
|
||||
}
|
||||
if (specs[2] !== '*') {
|
||||
|
|
Loading…
Add table
Reference in a new issue