Skip to content

Example of triggering jobs on cron schedule? #24

Open
@connor11528

Description

@connor11528

Hi there, we have a schedule set to run a job on a regular basis but it doesn't seem this job is running. We've added this to the schedule function within app/Console/Kernel.php as outlined in the Laravel task scheduling docs.

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->call(function() {
            (new JobListingsSeeder)->run();
        })->weekly()->sundays()->at('18:00');
        Artisan::call('cache:clear');

        $schedule->command('populateCompanyRaiseRounds')->twiceDaily(1, 13);
    }

However it doesn't appear that these commands are running. I see that there are Render docs on cron jobs. I was wondering, how can we run Artisan commands on a schedule while hosted on Render?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions