Nightly Build (cron task simulation)

I am trying to followup the following guide
https://circleci.com/docs/1.0/nightly-builds/

I want to trigger a cron job that will run several times a day, ‘npm run test’ on master branch in my github

I have my own VM in google cloud to trigger the cron task with the curl command … didn’t understand fully where can i find my circle token for the curl command ? also where should i state the ‘npm run test’ command, in circle yam?

Do you have another example i can follow