10 months 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
10 months ago
@Brody any idea who the best person to ask for API questions is?
10 months ago
me
10 months ago
That works lol
10 months ago
Any ideas on the above
10 months ago
is this a native railway backup?
10 months 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.
The service is a script that runs, does what it needs to do and then exits.
10 months 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
10 months ago
a lot?
10 months 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
10 months 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
10 months ago
yes but I just don't think the strategy you have in mind is the best
10 months ago
either way, just call the restart mutation
10 months ago
pretty sure
10 months ago
!s
Status changed to Solved adam • 10 months ago