Questions tagged [shedlock]

ShedLock assures that scheduled tasks are executed at most once at the same time.

ShedLock makes sure that scheduled tasks are executed at most once at the same time. If a task is being executed on one node, it acquires a lock which prevents execution of the same task from another node (or thread). If task is already being executed on one node, execution on other nodes does not wait, it is simply skipped.

ShedLock uses external store like Mongo, JDBC database, Redis, Hazelcast, ZooKeeper or anything with a JDBC driver.

https://github.com/lukas-krecan/ShedLock

https://www.baeldung.com/shedlock-spring

66 questions
0
votes
0 answers

More than 2 instances are running on different port hitting same database(Oracle) using SchedLock

I am using spring scheduler to send email in every 10 minutes, In which i want to deploy application in different server, so i have used shedLock to prevent multiple email at the same time, i followed documentation…
0
votes
1 answer

spring-boot and shedlock - how to track down dependency conflicts?

I need to update the minor version of spring-boot in a microservices project that uses shedlock. If spring-boot is on version 2.0.x it works fine, but if I upgrade it to 2.1.x, the tests the application maven build break and give me this…
gtludwig
  • 5,411
  • 10
  • 64
  • 90
0
votes
1 answer

SpringBootTest failing with 'IllegalStateException - No ServletContext set'

I have a pretty simple @SpringBootTest : @RunWith(SpringRunner.class) @SpringBootTest(classes = MyApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = {...}) public class MyApplicationTest { @Test …
Thoomas
  • 2,150
  • 2
  • 19
  • 33
0
votes
1 answer

How to understand when shedlock was acquired and released?

I have code like this: private final ThreadPoolTaskScheduler threadPoolTaskScheduler; // spring private final LockingTaskExecutor lockingTaskExecutor; // shedlock .... threadPoolTaskScheduler.scheduleWithFixedDelay( () -> { …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
-1
votes
1 answer

Synchronized code block for microservice architecture

We have a method that needs to have synchronized for a code block across all instances of microservice. MyEntity (class) in DynamoDB Example: field1(Partition Key), field2(Sort Key), isPrimary 1 1 true 1 …
Prem
  • 316
  • 1
  • 5
  • 23
-1
votes
1 answer

ShedLock - Not Executing

I am using shedlock library 4.20.0. net.javacrumbs.shedlock shedlock-spring 4.20.0 net.javacrumbs.shedlock shedlock-provider-jdbc-template 2.1.0 The scheduler job is, @scheduled(fixedRate = 5000) @SchedulerLock(name =…
Nandini Arjun
  • 15
  • 1
  • 4
1 2 3 4
5