'Is there a way I can run my cypress script on the cloud?

I know I could use a CI pipeline tool but I tried using circleci and i could only run this one an hour and I wanted to run it once a day.

So is there any online tools/frameworks/sites that will schedule and a cypress test/script once a day?

I'm a bit of a novice at this point...



Solution 1:[1]

Easily you can try with GitHub action,

You can try the following configurations in your workflow:

on:
  schedule:
    - cron: '0 1-23 * * *'
    - cron: '0 0 * * *'

jobs:
  test_schedule:
    name: Test schedule
    runs-on: ubuntu-latest
    steps:
      - name: Skip this step every 24 hours
        if: github.event_name == 'schedule' && github.event.schedule != '0 0 * * *'
        run: echo "This step will be skipped every 24 hours"
  1. The first cron ’ 0 1-23 * * *’ will trigger the workflow hourly from the 1st hour to 23th hour.

  2. The second cron ’ 0 0 * * *’ will only trigger the workflow at 00:00 UTC.

  3. The property " github.event.schedule" of the github context 8 returns the cron of the schedule that triggers the current workflow run.

  4. On the step that need to be skipped every 24 hours, set the if conditional to check which cron of the schedule triggers the current workflow run. If the cron is not ’ 0 0 * * *’, execute this step, otherwise skip this step.

And If circleci scheduled workflow

ex:

workflows:
  version: 2
  release:
    jobs:
      - test:
    triggers:
      - schedule:
          cron: "0 0 * * *"

this results in a build EVERY midnight

Using the asterisk (*) in a field means any value of that field is acceptable. Be aware that Circle CI will interpret the time as UTC so you may need to adjust it based on your timezone. https://crontab.guru/ is a nice site for learning about and experimenting with cron entries.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1