Job condition for each Xth run in a workflow or every Xth day of week

hi,
I’m trying to create a new job in a workflow for existing scheduled trigger (nightly build)
Looking for a way to make this particular job conditional, running weekly. I played around with having a separate workflow, but that brings complications of its own, with build numbers being different. Ideally I’d like to keep the single workflow if at all possible.

I have already on push, and scheduled nightly build triggers:
schedule:
- cron: ‘0 0 * * *’
push:
branches: [main]

and nightly automated testing job then specifies
if: github.event_name == ‘schedule’
…do nightly tests…
I’d like to add something like (with modulo operator)
if: github.event_name == ‘schedule’ && github.run_number%5 == 0
…do different set of longer running tests…
or
if: github.event_name == ‘schedule’ && Day of week == “SUN”
…do different set of longer running tests…

As I understand, you can add multiple cron jobs lines, but in that case it’s unclear how the job would distinguish whether nightly, or weekly job is being triggered.
schedule:
- cron: ‘0 0 * * *’
- cron: ‘0 4 * * 0’

I’d appreciate any ideas how to do this.

actually, you can do multiple cron jobs:
on:
schedule:
# Trigger the nightly build workflow
- cron: ‘0 0 * * *’
# Trigger the weekly build workflow
- cron: ‘0 3 * * 0’

and subsequently run desired jobs with appropriate condition:
test_performance:

# Weekly performance test job
 if: github.event_name == 'schedule' && github.event.schedule == '0 3 * * 0'