I’ve got my CI setup firing a deploy when everything passes (instead of automatic deploys) using the deploy hooks - and this works fine for web and worker processes. Cron jobs don’t have deploy hooks though - at least, I’m not spotting them. Is it somehow possible to rig one up?
Thanks for your reply Jade. I’m not sure I quite follow, though. Are you suggesting I could invoke once-off jobs via my web process, from a cron process - and so because the cron process never/rarely changes, it doesn’t need semi-automated deploys? I could see this potentially working, but it feels quite kludgy - essentially firing off two processes when one would ideally be good enough, and having to delve into an API as opposed to just pinging a deploy hook with curl.
I’ll consider it - and would appreciate access for the API if possible! - but right now I suspect it may be too much effort as a workaround.
Hi @pat, I’ve given you access to the API, in case you’d like to check it out. You can create an API key from your account settings page, and we have our documentation, which we are adding to here: https://apidocs.preview.render.com/
On second thought, I do agree with you that using one-off jobs might not be a suitable alternative for what you are trying to achieve. For some reason I was thinking along the lines of triggering the actual job vs. triggering the deploy. But we do still have deploy hooks for cron jobs in our backlog, so hopefully we’ll be able to add parity around this soon!
Now that there’s an extensive API that includes deploys, I’ve been able to script up a solution to this. I’ve got the following command being executed for each of my cron jobs (as well as standard web/worker services, to be consistent rather than mixing it with deploy hooks):