Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run psiCollectCron for both mobile and desktop on the same site #1079

Open
sahaj-myhq opened this issue Oct 21, 2024 · 0 comments
Open

Comments

@sahaj-myhq
Copy link

Is your feature request related to a problem? Please describe.
Yes. I want to run psiCollectCron and collect reports for both mobile and desktop, for the same website (and on the same URLs). I am aware that this is not supported officially and had found a workaround for this use-case when doing manual collections based on this issue. However, this approach doesn't work with psiCollectCron

Here's what I tried

// Using example variables for simplicity

const projectSlug = "XYZ";
const psiApiKey = "ABC";

createServer({
  // ... omitting other options
  psiCollectCron: {
    psiApiKey,
    sites: [
      {
        urls: ["https://example.com?desktop"],
        schedule: "0 0 1,15 * *", // At 00:00 on day-of-month 1 and 15
        projectSlug,
        numberOfRuns: 3,
        strategy: "desktop",
      },
      {
        urls: ["https://example.com?mobile"],
        schedule: "0 0 1,15 * *", // At 00:00 on day-of-month 1 and 15
        projectSlug,
        numberOfRuns: 3,
        strategy: "mobile",
      },
    ],
  },
});

And I get this error "Cannot configure more than one cron per project-branch pair"

Describe the solution you'd like
I would like for this workaround to work, or some officially supported solution that would let me do this :)

Describe alternatives you've considered
Setting a different branch as a workaround. However, this seems incorrect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant