A lock on the job — no double runs

The scenario sets a "busy" mark in Redis for the duration of a long job: a second run sees it, stops with a clear error, and leaves the data intact.

  • Only one run at a time
  • No duplicated data
  • The second run fails clearly, not silently
  • The lock expires — a hung job can't block everything
Redis

How it works

To connect Redis and , you don't need a developer: a ready-made scenario links them in minutes.

  1. Starts when: When Executed by Another Workflow
  2. Then: Set Timeout
  3. Check: Switch
  4. If yes: Get Key
  5. If no: Set Key
  6. Then: set continue
  7. If no: UnSet Key
  8. Starts when: When clicking ‘Test workflow’
  9. Check: If2
  10. Then: Is Workflow Active
  11. Then: Set Workflow Active
  12. Then: Set Workflow Finished
  13. Check: If
  14. If yes: Set Workflow Active1
  15. Then: Wait
  16. Then: Set Workflow Finished1
  17. If no: Stop and Error
  18. Then: Is Workflow Active1
  19. Check: If1
  20. If yes: Set Workflow "started"
  21. Then: Wait1
  22. Then: Set Workflow "loading"
  23. Then: Wait2
  24. Then: Set Workflow "finishing"
  25. Then: Wait3
  26. Then: Set Workflow Finished2
  27. If no: Stop and Error1
  28. Then: Is Workflow Active2
  29. Then: Is Workflow Active3
  30. Check: Switch1

You can launch this integration in Scriptera: describe the task in plain words — the scenario is built, launched and monitored for you.