Set cron string as output from cat/echo

Good morning/evening/night everyone! :slight_smile:

I’ve been trying to pass a cron string to an output with:

name: Test
on:
  push:
    branches: ["main"]
jobs:
  job1:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - id: step1
        name: step1 test
        env:
          PATH: ./cron
        run: |
          echo "::set-output name::cron=$(cat $PATH)"
      - id: step2
        name: step2 test
        run: |
          echo ${{ steps.step1.outputs.cron }}

And the cron file has only the schedule 20 * * * 4 * for example.

Executing this, gives me this error:

Error: Unable to process command '::set-output name::cron=20 * * * 4 *' successfully.

[7](https://github.com/<USER>/<REPOSITORY>/runs/1560583527?check_suite_focus=true#step:4:7)Error: Required field 'name' is missing in ##[set-output] command.

Anyone knows the reason of this behavior?

Maybe you already figured it out but syntax is wrong as it’s:

::set-output name={name}::{value}