#Get cron running on self hosted

1 messages · Page 1 of 1 (latest)

dreamy blade
#

I'm running self hosted based on railway based on the template from Jan Henning. It seems like the self hosted docs are completely different to the managed trigger.dev docs. Can any one show me how to use the cli to login to my self hosted instance and deploy a cron trigger to it?

The slef hosted docs only show me how to integrate with a framework, but I don't need that right now.

mint cargoBOT
#

Hi @dreamy blade. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the knowledge sources provided, I don't have enough specific information to give you a complete step-by-step guide on how to use the CLI to login to your self-hosted instance and deploy a cron trigger to it. The documents don't contain detailed instructions for this specific scenario with a self-hosted instance on Railway.

However, I can provide some general information and suggestions based on the available knowledge:

  1. For self-hosted instances, the setup and deployment process can indeed differ from the managed Trigger.dev cloud service. This is why you're seeing differences in the documentation.

  2. To use the CLI with a self-hosted instance, you might need to specify the self-hosted URL. Based on the information in Issue #921, you can try using the --self-hosted flag when running CLI commands.

  3. For deploying, you might use a command similar to:

    npx trigger.dev@latest deploy --self-hosted
    

    However, please note that the exact version and command might vary depending on your setup.

  4. Regarding cron triggers, while I don't have specific information for self-hosted instances, Trigger.dev does support cron schedules as mentioned in the introduction. You would typically set this up in your job definition.

  5. It's important to ensure you're using a compatible version of the CLI and other Trigger.dev packages. As mentioned in Issue #1645, there have been some version-specific issues with self-hosted deployments.

Given the lack of specific documentation for your use case, you might want to:

#
  1. Check the README or documentation that came with the Railway template you're using.
  2. Reach out to the Trigger.dev community or support channels for more specific guidance on self-hosted instances.
  3. Consider looking at the open-source self-hosting guide mentioned in Issue #1140, which might have more up-to-date information for self-hosted setups.

I apologize that I couldn't provide more specific instructions. The knowledge sources don't contain detailed information about setting up cron jobs on self-hosted instances, particularly for the Railway setup you're using.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@dreamy blade Kapa.ai is still learning and improving, please let me know how I did by reacting below.

plain seal
#

If it's the unofficial Railway template I've seen before, it's extremely old and out of date.

You have very little chance of using that template and getting it working, it's v2 I think which is very different. I recommend you use our official self-hosting guide and figure out how to apply that to Railway: https://trigger.dev/docs/open-source-self-hosting

The #self-hosters channel has people who are self-hosting in various places and they might be helpful.

Trigger.dev

You can self-host Trigger.dev on your own infrastructure.

dreamy blade
#

Cool thanks for the reply. I found the 2 cli tools quite confusing (trigger.dev and @trigger.dev/cli) and when i try login to the railway project, i get

"Whoami failed: 200 Validation error: Required at "dashboardUrl"

Incase anyone else runs into this issue

plain seal
#

Yeah @trigger.dev/cli is deprecated, it was relevant for v2.

You're seeing that whoami error because the version you're running is very old and the new CLI trigger.dev requires running the newer platform.

dreamy blade
#

all makes sense now! I've got it running locally on docker thanks to the scripts provided