diff --git a/packages/dm-core-plugins/src/job/CronJob.tsx b/packages/dm-core-plugins/src/job/CronJob.tsx index 98febb622..57e2c19ea 100644 --- a/packages/dm-core-plugins/src/job/CronJob.tsx +++ b/packages/dm-core-plugins/src/job/CronJob.tsx @@ -1,9 +1,8 @@ import React, { useEffect, useState } from 'react' -import { Button, Label } from '@equinor/eds-core-react' -import { StyledSelect } from './Input' +import { Autocomplete, Button } from '@equinor/eds-core-react' import DateRangePicker from './DateRangePicker' import styled from 'styled-components' -import { TSchedule } from '@development-framework/dm-core' +import { EBlueprint, TSchedule } from '@development-framework/dm-core' enum EInterval { HOURLY = 'Hourly', @@ -58,6 +57,8 @@ export function CreateReoccurringJob(props: { return Will run on sunday in every week } else if (interval === 'Monthly') { return Will run on the 1st on every month + } else if (interval === 'Daily') { + return Will run at {hour + ':' + minute} o'clock every day } else if (interval === 'Hourly') { return Will run every {hourStep} hour } @@ -79,10 +80,12 @@ export function CreateReoccurringJob(props: { dayOfMonth = '1' break case EInterval.HOURLY: - newHour = `*/${hourStep}` + newHour = hourStep ? `*/${hourStep}` : '*' } setSchedule(`${newMinute} ${newHour} ${dayOfMonth} ${month} ${dayOfWeek}`) }, [interval, hour, minute, hourStep]) + + console.log(schedule) return (
@@ -97,57 +100,41 @@ export function CreateReoccurringJob(props: { />
-
{interval !== EInterval.HOURLY && (
-
)} {interval === EInterval.HOURLY && (
-
)}
@@ -166,14 +153,12 @@ export function CreateReoccurringJob(props: { Remove