My scheduled job didn't run as expected

Hello, I recently got to known CircleCi and I tried to configure my first scheduled job using pipeline and trigger. I have read the offical docs and the configuration file is below. When I set this job, Iit returned a successful response after each commit but it didn’t run as scheduled. Can some guys help me to solve it?

version: 2.1

jobs:
  build:
    docker:
      - image: cimg/python:3.10.2
    resource_class: small
    steps:
      - checkout
      - run: 
          name: Upgrade pip
          command: /home/circleci/.pyenv/versions/3.10.1/bin/python3.10 -m pip install --upgrade pip
      - run: 
          name: Insall Dependices
          command: pip3 install requests
      - run: 
          name: test
          command: python3 run.py -u $USERNAME -p $PASSWORD

parameters:
  test:
    type: boolean
    default: false

workflows:
  commit:
    jobs:
      - build
  test:
    when:
    and:
      - equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
      - equal: [ "run-schedule", << pipeline.schedule.name >> ]
    jobs:
      - build

Hi @iyrepl and welcome to the CircleCI community!

I suspect the issue stems from the missing indentation before the operator and.

The correct syntax is:

workflows:
  commit:
    jobs:
      - build
  test:
    when:
      and:
        - equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
        - equal: [ "run-schedule", << pipeline.schedule.name >> ]
    jobs:
      - build

Let me know if this helps.