a year ago
Let's say I want to trigger a back up from a database with a command in my CLI. What mutation should I use? deploymentRestart and deploymentTriggerCreate look like good candidates
33 Replies
a year ago
@Brody any idea who the best person to ask for API questions is?
a year ago
me
a year ago
That works lol
a year ago
Any ideas on the above
a year ago
is this a native railway backup?
a year ago
@patod01 ^^
all that I need is being able of triggering a service as a cronjob would do, but from the API
the service in question is a docker instance. I could duplicate it so I can give it 2 cronjobs, because I need it to run in different moments depending of the day. On fridays it must run at 2pm and the rest of the week it must run at 6pm
the problem increases in complexity when I need to add a new volume and a new cronjob for each duplication of the service.
a year ago
how many services do you think you'd end up having?
the problem is that the image it depends on is heavy. The image alone is 1 giga. So I thought it would be better to have a simple bun function that calls it every time and having that bun function with a cronjob to check if it has to call the service every hour, for example
a year ago
a lot?
a year ago
could you bake in a simple binary into your desired image, then that binary could run as PID 1, start a web server, then you can call it to start the job, then you'd only need one service
well, I haven't thought enough the cronjob, but in essence, it would be 1 service per cronjob if I can't make use of the api
a year ago
I really can't recommend doing that if there is going to be a lot of jobs, find a way to have a single service do the jobs
a year ago
yes but I just don't think the strategy you have in mind is the best
a year ago
either way, just call the restart mutation
a year ago
pretty sure
a year ago
!s
Status changed to Solved adam • about 1 year ago