jhuckaby / Cronicle

A simple, distributed task scheduler and runner with a web based UI.
http://cronicle.net
Other
3.67k stars 383 forks source link

Question About Elapsed Job Time #781

Open yasin-ahlatci opened 2 months ago

yasin-ahlatci commented 2 months ago

Summary

I'm running some php scripts in my cronicle instance. Events are completed exactly on 59 seconds or 60 seconds. But some of them should be less than 10 secs to complete and some of them should more than 3 minutes. I'm not sure if this is a misconfiguration or error. But I couldn't find anything Event Configurations;

Example event script

#!/bin/bash
set -e
php <somephpscriptdir>

Steps to reproduce the problem

Create an event with given configuration, then run the event.

Your Setup

I'm running 1 master 2 worker instances with S3 storage configuration.

Operating system and version?

Ubuntu 22.04

Node.js version?

20.15.0

Cronicle software version?

0.9.52

Are you using a multi-server setup, or just a single server?

Multi server, but single-master

Are you using the filesystem as back-end storage, or S3/Couchbase?

S3

jhuckaby commented 2 months ago

You're using "detached mode", which comes with some big tradeoffs. One of which is, job completion is only checked every minute, not in real time. This is because the processes are entirely detached, and Cronicle monitors them by polling a status file every minute.

Read about the tradeoffs of detached mode here: https://github.com/jhuckaby/Cronicle/blob/master/docs/WebUI.md#detached-mode

yasin-ahlatci commented 2 months ago

Thank you, that explains it all. I missed it somehow