abichinger / vue-js-cron

Renderless Vue.js cron editor
MIT License
67 stars 23 forks source link

On Quartz format can not define periods #34

Closed bahramhasanov closed 6 months ago

bahramhasanov commented 10 months ago

When I am defining periods it works ok for cron format. It starts to fail when quartz defined.

example code:


<cron-light v-model="inputValue" format="quartz"  :periods="cronConfiguration"></cron-light>

<script>

    cronConfiguration: [
        {id: 'second', value: []},
        {id: 'minute', value: ['second']},
        {id: 'hour', value: ['minute', 'second']},
        {id: 'day', value: ['hour', 'minute', 'second']},
        {id: 'week', value: ['dayOfWeek', 'hour', 'minute', 'second']},
        {id: 'month', value: ['day', 'hour', 'minute', 'second']},
        {id: 'year', value: ['month', 'day', 'hour', 'minute', 'second']}
      ],

</script>
abichinger commented 10 months ago

Until now the format option wasn't included in @vue-js-cron/light, because I had some issues releasing it. @vue-js-cron/light@3.0.0 is the first version to support the quartz format. However, quartz support is still limited (no support for L W or #)

These are the default periods for quartz:

[
  {
    "id": "q-second",
    "value": [],
    "text": "Second"
  },
  {
    "id": "q-minute",
    "value": [
      "second"
    ],
    "text": "Minute"
  },
  {
    "id": "q-hour",
    "value": [
      "minute",
      "second"
    ],
    "text": "Hour"
  },
  {
    "id": "day",
    "value": [
      "hour",
      "minute",
      "second"
    ],
    "text": "Day"
  },
  {
    "id": "week",
    "value": [
      "dayOfWeek",
      "hour",
      "minute",
      "second"
    ],
    "text": "Week"
  },
  {
    "id": "month",
    "value": [
      "day",
      "dayOfWeek",
      "hour",
      "minute",
      "second"
    ],
    "text": "Month"
  },
  {
    "id": "year",
    "value": [
      "month",
      "day",
      "dayOfWeek",
      "hour",
      "minute",
      "second"
    ],
    "text": "Year"
  }
]

What are you trying to achieve by specifying custom periods?

abichinger commented 6 months ago

closing due to inactivity