Scheduling An Queued Jobs is not appending the data into my custom log file | Laravel | Queue Job | Task scheduling

I have a Laravel application where I used the Task Scheduling option to Schedule one command and one job.

I face an issue when I try to use appendOutputTo and emailOutputTo option. The output of the command is appended to the file without any error. But I don't find a way to return data from the job and use it as appendOutputTo data option.

In my ClearLogs class's handle function return the information as $this->info() so this information can be used to append as output to the cron.log file

ClearLogs.php

public function handle()
{
    $file_regex = $this->option('file');
    $files = glob('storage/logs/'.$file_regex.'*.log');

    foreach ($files as $file) {
        if (file_exists($file)) {
            file_put_contents($file, "");
            // unlink($file);
        }
    }
    $this->info('The '.$file_regex.' logs has been cleared.');
}

This is my Kernal.php file where the output of the ClearLogs command is appending successfully to the cron.log file but how do I can append the output(which I don't know how to send from job) of the job to the same file.

Kernal.php

protected function schedule(Schedule $schedule)
{
    $filePath = storage_path("/logs/cron.log"); 

    // The following command is used to clear the Laravel logs on every Two Minutes.
    $schedule->command('logs:clear')->everyTwoMinutes()->appendOutputTo($filePath);

    $schedule->job(new GenerateInvoicesFromRecurringInvoice, 'high')
        ->everyTwoMinutes()
        ->before(function () {
            // print_r('Task is about to start...');
        })
        ->after(function () {
            // print_r('Task is complete...');
        })
        ->onSuccess(function () {
            // print_r('The task succeeded...');
        })
        ->onFailure(function () {
            // print_r('The task failed...');
        })
        ->timezone(env('APP_TIMEZONE', 'America/Los_Angeles'))
        ->environments(['local', 'development', 'production'])
        ->withoutOverlapping()
        ->evenInMaintenanceMode()
        ->appendOutputTo($filePath)
        ->emailOutputTo('testing@mydomain.com');
}

GenerateInvoicesFromRecurringInvoice.php

App\Jobs\GenerateInvoicesFromRecurringInvoice.php

class GenerateInvoicesFromRecurringInvoice implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * The number of times the job may be attempted.
     *
     * @var int
     */
    public $tries = 3;

    /**
     * The maximum number of exceptions to allow before failing.
     *
     * @var int
     */
    public $maxExceptions = 3;

    /**
     * The number of seconds the job can run before timing out.
     *
     * @var int
     */
    public $timeout = 20;

    /**
     * The number of seconds to wait before retrying the job.
     *
     * @var int
     */
    public $retryAfter = 9;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        $current_date = Carbon::now()->format('Y-m-d');

        try {
            DB::beginTransaction();

            $logData = [];
            if (on some condition) {
                // do some database stuff and push data into logData.
            }
            DB::commit();
            if ($logData) {
                return "New invoices has been generated: ".json_encode($logData); // I don't know how to use this data and append to cron.log file
            }
        } catch(Exception $e) {
            DB::rollback();
            $this->failed($e);
        }
    }

    /**
     * Handle a job failure.
     *
     * @param  \Throwable  $exception
     * @return void
     */
    public function failed(Throwable $exception)
    {
        Log::channel('cronlog')->error($exception->getMessage());
    }

    /**
     * Determine the time at which the job should timeout.
     *
     * @return \DateTime
     */
    public function retryUntil()
    {
        // return now()->addSeconds(5);
    }
}

Side note:- I am using my custom log to log the data into the cron.log file. This is working fine. Here is my logging.php config file.

logging.php

return [
    // ...
    'channels' => [
        // ...
        'cronlog' => [
            'driver' => 'single',
            'path' => storage_path('logs/cron.log'),
            'level' => 'info',
        ],
    ],
];