bfg-common 1.4.274 → 1.4.275

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -129,8 +129,6 @@ const frequencyMethodOptions = computed<UI_I_SelectInputItem[]>(() =>
129
129
  watch(
130
130
  model,
131
131
  (newValue: UI_I_ScheduleNewTasksForm) => {
132
- console.log(newValue, '444444')
133
- const date = newValue.frg_on_time && new Date(newValue.frg_on_time)
134
132
  newValue.cron = generateCronExpression(newValue.frequency, newValue)
135
133
  },
136
134
  { deep: true }
@@ -158,10 +156,12 @@ const generateCronExpression = (
158
156
  // Генерируем cron-выражение на основе runType
159
157
  switch (runType) {
160
158
  case 'once':
161
- cronExpression = generateOnceCronExpression(interval.frg_on_time)
159
+ const date = interval.frg_on_time && new Date(interval.frg_on_time)
160
+ cronExpression = generateOnceCronExpression(date)
162
161
  break
163
162
  case 'after-startup':
164
- cronExpression = `* * * * * after_procurator_startup` // Выполнение каждые N часов
163
+ const delay = `*/${interval.frg_after_startup}`
164
+ cronExpression = `${delay} * * * * after_procurator_startup` // Выполняется каждые N минут после запуска procurator_startup
165
165
  break
166
166
  case 'hour':
167
167
  cronExpression = `* * * * *` // Выполнение каждые N дней в полночь
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.274",
4
+ "version": "1.4.275",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",