461 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
66
views
Cannot deactivate scheduling for Spring Boot integration test
I'm on Spring Boot 3.5.6 with Java 25 (Temurin). I followed this tutorial.
My config:
@Configuration
@EnableScheduling
@Profile(value = "!integrationtest")
public class SchedulingConfig
{
}
...
0
votes
0
answers
38
views
Instrumenting spring boot scheduler
I've created a Spring boot using scheduled. I configured to prometheus collect metrics of this api, but when I try to access the /actuator url, I got error like:
Error scraping target: Get
"http:...
-1
votes
1
answer
494
views
Spring Boot ThreadPoolTaskScheduler not working for scheduled tasks
Spring Boot 3.4.2 and Java 21.
We have a simple test scheduled task which takes 32 seconds, and is scheduled every 30 seconds:
@Slf4j
@Component
public class DailyImport {
@Scheduled(cron="${...
0
votes
2
answers
138
views
Scheduled function in an abstract class with different schedules in the child classes
In my Spring application, I have an abstract class with a function functionA and an abstract function functionB. functionA calls functionB and the latter is implemented in the child classes.
I want ...
2
votes
0
answers
63
views
Testing @Scheduled annotation starts more than one thread
I have a Spring Boot application and I created a method with the @Scheduled annotation that takes a cron expression as parameter (let's say it needs to run every 5 seconds). The scheduled method is as ...
2
votes
1
answer
177
views
Setting Spring Scheduler to run every month when there are six days left until the end of the month
Is it possible to set Spring Scheduler to run every month when there are six days left until the end of the month ?
If so, what would be the CRON expression for this to happen ?
0
votes
1
answer
34
views
Avoid duplicate scheduled task executions across multiple Nginx servers in Spring Boot
I have a Spring Boot application deployed on two Nginx servers. It includes a daily scheduled task to generate reports using the @Scheduled annotation, which triggers the addDailyReports method.
The ...
0
votes
1
answer
36
views
How can I avoid millisecond delays in @Scheduled annotations?
I use @Scheduled in my work to implement some simple timed tasks,for example:
private static long pre = System.currentTimeMillis();
@Scheduled(fixedRate = 5000L)
public void testScheduled() {...
1
vote
0
answers
156
views
How to schedule tasks in multitenant spring app having separate schema for each tenant
I have develop small Spring boot Multi-tenant SAAS application
refer https://github.com/mahaveer3103/multi-tenant-springboot, now i want to schedule some tasks for every tenant like to check password ...
1
vote
1
answer
43
views
How to view upcoming events for multiple @Scheduled annotations?
Our java service has lots of scheduled tasks, that are defined using an @Scheduled annotation.
I'd like to take this list of Spring crons, and dump a list of them to a calendar format, so I can easily ...
0
votes
0
answers
164
views
Spring scheduled - can I join fixed delay with cron
I am using spring and springboot, and I have case with two tasks, which until now was triggered by @Scheduled with fixed delay. It is a must condition, that next task won't start if previous did not ...
0
votes
1
answer
723
views
Set cron schedule from properties file rather than hard coding it and still avoid Attribute value must be constant
I'm using SchedulerLock to create a schedule in my Spring Boot application. Currently the schedule is hard coded to run every 3 hours:
private final String everyThreeHours = "0 0 */3 * * *";
...
-1
votes
1
answer
78
views
Spring job doesn't store JPA entity to DB and doesn't throw any exception even if table is not exist
I have a problem with storing JPA entity in Spring job, when I hit my code via REST my entity is stored to DB, but I need to have some automatization part via scheduler, but it doesn't work, and it ...
0
votes
1
answer
157
views
multiple jobs to be run by a scheduler and locking
I have a springboot application deployed in PCF. I have a scheduler that runs every hour and picks up eligible jobs from a database to run. I need to implement some locking mechanism so that ...
-1
votes
1
answer
2k
views
Send message from server to client use Websocket. Java
I hope for your help, I have already looked through everything but have not found an answer. The task is this: I need to send information from my Java application to the client (frontend). The essence ...