verbb / scheduler

A plugin for Craft CMS that allows you to schedule jobs to be executed on a given date.
MIT License
40 stars 7 forks source link

How does it actually work? #2

Closed max8hine closed 11 months ago

max8hine commented 5 years ago

👋 Team, the plugin is awesome, even I haven't got it working in my project.

I Could not really grasp of Step-4 of installation How to set up a corn entry?

Set up a CRON entry to hit the console command every minute:


My goal is

  1. To schedule a job via The internal API
  2. Connect the scheduled job's task with my controller funciton

Is below code is to schedule a job via The internal API

use supercool\scheduler\Scheduler;

Scheduler::$plugin->jobs->addJob('my-job-type-name', '* * * * *')

How should I connect the job's task with my console command? php craft shopify/cron/sync

Don't know how to connect them together.😿

Hope my question makes sense here, I am new to Craft also.