How to Implement Cron Job in Shopify Custom app

How to Implement Cron Job in Shopify Custom app

mohit12
Shopify Partner
8 0 1

Hello Folks,
I have query , I am making an App in remix and Graphql  and onto last step of it  which is to generate report of  no of installs  of that app in that App after every X days  .And for that purpose we need to run Cron job , So the question is can anyone tell how we can implement the Cron job in Shopify to get  the  result after every x days
Thanks in Advance.

Replies 4 (4)

Sunil-Kumar
Excursionist
16 1 1

Shopify doesn't provide cronjob service but you can create a open route with some security measures and add a cronjob to your server with that open route.

SK
mohit12
Shopify Partner
8 0 1

Hi Sunil ,thanks for the reply

mohit12
Shopify Partner
8 0 1

Hi Sunil  Can you guide me more on this  like I am using Remix (React-library) and graphql .how can I create  a open route in remix

 

Sunil-Kumar
Excursionist
16 1 1

Hi Mohit12, you need to create file in routes folder without 'app.' prefix and use loader and action functions according to get and post request.

 

You also find about public routes in remix Shopify app here : https://shopify.dev/docs/apps/getting-started/build-qr-code-app?framework=remix

 

I hope this will be helpful to you.please give me a like.

SK