Timer not found

I have the following codebase structure

app.js
Dockerfile
bin/
 cleanup
timers/
  topic/
    Dockerfile
convox.yml

and my convox.yml looks like

services:
  web:
    build: .
    port: 3000
  timers:
    build: ./timers/topic
    scale: 0
timers:
  cleanup:
    command: bin/cleanup
    schedule: "*/5 * * * ? *"
    service: timers

I’m getting this error timer/cleanup:KWWFBULRYEN/f60b8c6efcc9 sh: 1: bin/cleanup: not found

I tried moving the bin folder into the timers folder like this

app.js
Dockerfile
timers/
  topic/
    Dockerfile
    bin/
      cleanup
convox.yml

But I’m still getting the same error. Why is bin/cleanup not being found?

What’s your timers Dockerfile doing? If you build and run that yourself locally can you run the bin/cleanup command with the image?

Hey @ed_convox,

My Dockerfile looks like this:

FROM mysql:5.6
COPY bin/cleanup /bin/
ENV MYSQL_ROOT_PASSWORD=somepassword
CMD ["mysqld"]

I can convox exec into my timers service and run the bash script manually bash bin/cleanup and it will run just fine.

EDIT:

I can confirm my timer is working and running. I had a typo in my CMD in the Dockerfile. Sorry for all the trouble.

1 Like