So I spent yet a few hours sleuthing this out. I was sprinkling
DB::table('test')->insert(['key'=>'some location']); statements every step of the way.
I also took a look at the error logs. (Hand over face moment) yes the logs. I didn't think to check them because I was so darn fixated on telescope's exception panel, which showed nada.
So I was able to resolve the problem.
I have a bunch of abstract classes that inherit from one another. Since this is a complicated project I have been type-hinting all inputs so that a few years from now, code maintenance is easier.
Well it turns out that a few inherited methods where type hinted in the abstract parent class BUT where not properly type hinted in the child class.
So in essence I had things like this in the Parent Class:
/* Abstract child methods */
abstract protected function encodeQuery(string $rawQuery);
abstract protected function cleanLinksHook(array $links);
But in the various child classes I had a few spots where I was sloppy and was creating the method without proper type-hinting... like this:
protected function cleanLinksHook($links) {
...
}
or this
protected function cleanLinksHook(Array $links) {
...
//notice the capital A
}
I can see why this didn't work BUT the weirdest thing, is the code ALWAYS worked when running php artisan schedule:run once off, manually in the command line BUT never when run via cron/scheduler. I tested it dozens of times and there is not logical reason I can think of why this was the case BUT it was. very very very strange.