-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cronicle API: create_event creates wrong timings #801
Comments
Hi there! I'm so sorry this tripped you up. There is a way to do it, but it's subtle, and I apologize for the confusion. Here is how to do it, and I will update the docs to cover this as well: An "on demand" event has no An event that should run every minute of every day of every month of every year, should have an empty curl https://$CRONICLE_HOSTNAME/api/app/create_event/v1 -X POST -H "Content-Type: application/json" --data '{ "title": "'$CRON_IDENTIFIER'", "category": "general", "enabled": 1, "plugin": "shellplug", "target": "'$CRONICLE_HOSTNAME'", "session_id": "'$session_id'", "timing": {} }' I am updating the docs right now, to explain this properly. Thank you for bringing this to my attention! |
ah alright, thank you for coming back to me so fast. I tried and this worked! btw: unrelated to this issue, but I am running Cronicle on Kubernetes and I found a simple solution to the cronicle with https behind a loadbalancer. I use haproxy but i think it should work with other proxies such as traefik/nginx as well. |
That's great! Please feel free to create a discussion topic about that: https://github.com/jhuckaby/Cronicle/discussions/new?category=show-and-tell I'm sure others can benefit from it! |
Summary
I am using a curl call to create an event. In the docs, I read the following: "Each property should be an array of numerical values. If omitted, it means the same as "all" in that category (i.e. asterisk * in Cron syntax)"
(https://github.com/jhuckaby/Cronicle/blob/master/docs/APIReference.md#event-timing-object). So i thought, if I do not give up my timings, it will run every minute of every hour of every day, etc.
Instead, it creates an on demand event.
I would like a way to create an * * * * * event without having to specify every "time"
Steps to reproduce the problem
Perform a curl call to the cronicle:
curl https://$CRONICLE_HOSTNAME/api/app/create_event/v1
-X POST
-H "Content-Type: application/json"
--data '{ "title": "'$CRON_IDENTIFIER'", "category": "general", "enabled": 1, "plugin": "shellplug", "target": "'$CRONICLE_HOSTNAME'", "session_id": "'$session_id'" }'
Your Setup
NA, but: Cronicle on Kubernetes with Loadbalancer
Operating system and version?
NA, but: Ubuntu 22.04.4
Node.js version?
v20.17.0
Cronicle software version?
Version 0.9.59
Are you using a multi-server setup, or just a single server?
single server
Are you using the filesystem as back-end storage, or S3/Couchbase?
filesystem
Can you reproduce the crash consistently?
NA
Log Excerpts
NA
The text was updated successfully, but these errors were encountered: