Questions tagged [cron-task]

cron-task is a task (command or shell script) executed periodically at certain times or dates by the cron scheduler.

Resources

925 questions
1
vote
0 answers

Cron-job not maintaining intervals

please have a look at the following code: var cron = require('node-cron'); const { main } = require("./main/depositTxn.js") cron.schedule('* */5 * * * *', async () => { await main("0xdd160613122C9b3ceb2a2709123e3020CaDa2546"); }); I guess I…
1
vote
2 answers

Laravel, limit database queue to 1 email per minute

My application is hosted on a shared hosting platform that limits to 200 emails per hour. My application is running database connection driver and I have 3000 jobs in the jobs table. I would like to throttle this queue to only send 1 email every 30…
Lefty
  • 1,192
  • 13
  • 18
1
vote
0 answers

Check cron job minimum span

I have an app that accepts a cron definition from the user Now - let's say I want to limit how many crons the user can run - so that the minimum span between each cron would be once an hour. How can I check whether the provided cron-job "at most" or…
Wassap124
  • 381
  • 4
  • 14
1
vote
2 answers

How to write a cron job ( Scheduled task ) in spring web flux?

I am implementing forget password feature in spring web flux application and where I am sending an OTP with a expiration of 5 min upfront. So I want to invalidate them by executing a cron job every 2 seconds. Though this is a web flux project I want…
1
vote
0 answers

How make spring batch job execute only once

I am new to Spring Batch, I have a Spring Boot App, and I want to set up a job that executes only once after Spring Boot app gets started, as we will run app each day In my current solution, I tried to use attribute @Scheduled, but I am not sure…
Szanownego
  • 239
  • 1
  • 11
1
vote
1 answer

Bigquery custom schedule at 3 specific time

I am trying to create scheduled query on bigquery at 3 specific time at 07:00, 14:00, 17:00 everyday. I tried looking for custom schedule syntax and came across this…
1
vote
1 answer

PHP CRON expression to execute only once

What is the best way to define the cron definition to execute only once and non-recurring job (not to repeat next time) Say for example to execute only once at Nov 23, 2021, 11:11 AM I am not sure how to define year in cron expression…
GaPa
  • 138
  • 1
  • 9
1
vote
1 answer

Centos7 Crontab jobs is not executing periodically

Am using a centos7 VPS server, recently I noticed that my website Crontab is not executing periodically on it own as scheduled. I have list of cron jobs but not of it will execute when the time come, but if I login to my CWP web panel and manually…
Peter
  • 1,860
  • 2
  • 18
  • 47
1
vote
1 answer

Django: how to test for concurrency issues when using cron jobs

I have a Django application hosted on a remote server which runs some cron jobs at relatively short intervals. One of these cron jobs executes a command that fetches a queryset from the database, calls an external API and changes the models based on…
andreashhp
  • 485
  • 2
  • 16
1
vote
1 answer

Cron Job doesn't work on CPanle using Laravel Project

I'm trying to run a schedule task on cpanel. So I'm using the following code : Command : notify.php
saadia
  • 79
  • 9
1
vote
2 answers

Can a cronjob continue to run 30 minutes continuously?

I have created a script on PHP that creates cache files from API and it takes around 30 minutes to load the page completely means when it creates all cache files. I have a concern that my hostinger's customer support is telling me that it won't run…
web90
  • 15
  • 5
1
vote
2 answers

How to set cron expression for multiple time periods

I have a requirement to trigger cron job at 9 am and 10.15 pm every day. i.e the trigger will be as: next today at 09:00:00 then today at 22:00:00 then today at 22:15:00 then next day at 09:00:00 and so on... I have done it as * 0,15 9,22 * * *…
Viveka
  • 340
  • 2
  • 14
1
vote
1 answer

How to read fixedDelayMinutes from yml file and shedule the job in spring-boot

I want to read value from yml in minutes and then in scheduler give the value in milliseconds e.g. for 5 min 5 * 60 * 1000 @Scheduled(fixedDelayString = "${jobintervalmins} * 60 * 1000") I have tried like this, but it is not working I am getting…
S.R
  • 113
  • 11
1
vote
1 answer

Cloud scheduler - HTTP - list in payload/body

I have a scheduled job in GCP that POSTs to the endpoint of a REST service. The payload expected by the url is {"foo": ["bar"]} I specified "{\"foo\": \[\"bar\"\]}" in the Body field in the web console : AND specified application/json in the…
dada
  • 1,390
  • 2
  • 17
  • 40
1
vote
1 answer

Spring boot @Scheduler not working in Google Kubernetes Engine

I have a Spring boot application which consists of a scheduled task and a rest controller. The scheduled task connects to Gmail with Javamail to parse certain emails and store them in a MongoDB database and the controller is to query that data in…