php - Laravel 5 - Setting Kernel to run test script at regular intervals. (Cron job)

In my laravel project, I have this file in my tests directory:
tom_test.php
:
<?php
error_log("hello world");
I want to schedule this script to run every 'x' amount of time. I've seen this question from cyber8200. Unfortunately, I'm unsure how to make this test script to run.
Do I have to convert the test file to a class instead?
I would appreciate it if somebody would explicitly state what code needs to be added to theapp/Console/Kernel.php
file.
I suspect it should resemble some of the code in the cyber8200 question
UPDATE
Thanks to Tim Lewis' comment, I've managed to get the cron job running (I think).
Unfortunately, I cannot see the "hello world" message being logged to the console.
Here is what I've done
I added a command as follows:
public function handle()
{
error_log("hello");
// echo base_path();
exit;
include base_path().'/tests/Browser/tom_test.php';
}
and this schedule function to the kernel:
protected function schedule(Schedule $schedule)
{
$schedule->command('tom_test')
->everyMinute();
}
The job seems to be quitting after one run, and no message is logged to the console.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: mark bundle as not supporting multiuse
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.