Vue-js-cron Docs
Vue v2
Demo
Guide
API
Github
Vue v2
Demo
Guide
API
Github
    • Getting Started - Core
    • Getting Started - Light
    • Theming - Light
    • Getting Started - Ant
    • Getting Started - Element Plus
    • Getting Started - Naive UI
    • Getting Started - PrimeVue
    • Getting Started - Quasar
    • Getting Started - Vuetify
    • Custom Periods
    • Custom Cron Expression
    • Special Values

Special Values

The day of month field of the quartz and spring format supports the special values L and W.

ValueDescription
Llast day of the month
L-33 days before the last day of the month
LWlast weekday of the month
15Wweekday nearest to the 15th of the month

L and LW are part of the items of the day field, therefore they can be selected like any other value. L-<n> and <n>W are parsed and displayed, but they have to be set through v-model.

Special values can't be combined with other values, e.g. L,15 is not a valid day of month.

0 0 0 L * ?
Every
in
every month
on
every day
and
every day of the week
at
every hour
:
every minute
:
every second

Other formats

The special values are disabled for the crontab format, because crontab doesn't support them. specialDays enables them for any format.

<template>
  <div>
    <div class="mb-2">{{ value }}</div>
    <CronLight v-model="value" :format="format" @error="error = $event" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: '0 0 L * *',
      error: '',
      format: { specialDays: true },
    }
  },
}
</script>
0 0 L * *
Every
in
every month
on
every day
and
every day of the week
at
every hour
:
every minute

Disable Special Values

To disable the special values for quartz and spring formats, set specialDays to false.

<template>
  <div>
    <div class="mb-2">{{ value }}</div>
    <CronLight v-model="value" :format="format" @error="error = $event" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: '0 0 0 * * *',
      error: '',
      format: { inherit: 'spring', specialDays: false },
    }
  },
}
</script>
0 0 0 * * *
Every
in
every month
on
every day
and
every day of the week
at
every hour
:
every minute
:
every second
Contributors: Ismoil
Prev
Custom Cron Expression