[SOLVED] Add a way to trigger or test a cron job

I’m trying to start using Drone 1.1’s cron jobs, moving from something else that promoted builds to achieve the same.

However, I want these cron jobs to run every few hours, and the cron scheduler isn’t exact, so it’s hard to get Drone to fire a cron job so I can check whether my drone.yml is properly set up with the cron “when” filter or not.

It would be ideal to have a command I can use for this, like drone cron fire <name>.


Bump @bradrydzewski? Some other users seem to agree. I’m following the rule to use the forum instead of the issue tracker, but I get the impression that most of my suggestions end up getting buried in the forum.

1 Like

I’d love to see this as well. I haven’t found a way to do this, but what I’d like to do even as a workaround is have 2 triggers which could launch the event, something like this:

    - cron
    - promote
    - prod
    - weekly

But the catch is that one or the other trigger conditions need to be met - not both. Looks like Drone evaluates the conditions together with ANDs, so this wouldn’t work as is.

This is an old thread and the information is outdated. The ability to trigger and test a cron job is available to Drone version 1.5.0 and higher. You can find the relevant release notes here and the API documentation here.