funkyfuture / deck-chores

A job scheduler for Docker containers, configured via labels.
https://deck-chores.readthedocs.io/
ISC License
197 stars 27 forks source link

Issue with command trigger with valid cron #58

Closed ea-ncu closed 4 years ago

ea-ncu commented 4 years ago

I have a build configuration for mongodb in my docker-compose.yml file.

I have added the following section to the labels:

deck-chores.label-name-one.command: "mongo localhost:27017/myDB /scripts/aggregate-script.js" deck-chores.label-name-one.cron: "14,29,44,59 "

Based on the cron, I would expect my script to run every 14th, 29th, 44th and 59th minute.

I have tried changing the cron part to "/1 *" and the script runs successfully every minute.

Is there a possible issue parsing this cron properly? As I understand it is via APScheduler and they seem to support the comma notation.

funkyfuture commented 4 years ago

does this help?

In contrast to the classic, the sequence of fields is flipped, starting with the greatest unit on the left.

ea-ncu commented 4 years ago

does this help?

In contrast to the classic, the sequence of fields is flipped, starting with the greatest unit on the left.

I read those docs multiple times but somehow skipped past it thinking "ah yeah business as usual"

Thanks for pointing it out specifically, I will give it a test and then if it works okay, I will close this issue

ea-ncu commented 4 years ago

I used "14,29,44,59 0" and now it works, sorry for the inconvenience and thanks again for pointing to where I need to look :+1: