diff --git a/resources/js/layouts/AppLayout.vue b/resources/js/layouts/AppLayout.vue
index 0dd476d..f11f2d4 100644
--- a/resources/js/layouts/AppLayout.vue
+++ b/resources/js/layouts/AppLayout.vue
@@ -1,5 +1,5 @@
diff --git a/resources/js/stores/alertStore.ts b/resources/js/stores/alertStore.ts
index c273a0f..cb9114b 100644
--- a/resources/js/stores/alertStore.ts
+++ b/resources/js/stores/alertStore.ts
@@ -1,4 +1,3 @@
-import { options } from '@coders-tm/vue-number-format';
import { defineStore } from 'pinia'
export interface AlertOptions {
diff --git a/resources/js/stores/webcronStore.ts b/resources/js/stores/webcronStore.ts
new file mode 100644
index 0000000..686a387
--- /dev/null
+++ b/resources/js/stores/webcronStore.ts
@@ -0,0 +1,32 @@
+import { defineStore } from 'pinia'
+import axios from 'axios';
+
+export const webcronStore = defineStore('webcron', {
+ state: () => {
+ return {
+ timeout: 1000 * 30,
+ interval: 0,
+ url: '/webcron'
+ }
+ },
+ actions: {
+ start() {
+ if (this.interval) return
+ this.triggerWebcron(this.url)
+ this.interval = setInterval(this.triggerWebcron, this.timeout, this.url)
+ },
+
+ stop() {
+ clearInterval(this.interval)
+ this.interval = 0
+ },
+ triggerWebcron: async (url: string) => {
+ await axios.get(url)
+ .catch(function (response) {
+ if (response.status >= 400) {
+ console.error(response.message)
+ }
+ })
+ }
+ }
+})
\ No newline at end of file