Comments (22)
The error is coming from a dependency of Dispatcher. Can you post your schedule()
that is throwing this error?
from dispatcher.
It looks like there also might be an issue with a dependency here. The stack trace shows Indatus\\Diipatt...
, whereas the namespace of this package is Indatus\Dispatcher
from dispatcher.
Apologies, I was without a computer over the weekend.
Here are the registered schedule methods, I will try disabling them all and then re-enabling them one by one to see if that changes anything. Note that these are all from different commands.
/**
* When a command should run.
*
* @param Scheduler $scheduler
* @return \Indatus\Dispatcher\Scheduling\Schedulable
*/
public function schedule(Schedulable $scheduler)
{
// Run on Friday at 9am.
return $scheduler->daysOfTheWeek(Scheduler::FRIDAY)->hours(9)->minutes(0);
}
/**
* When a command should run.
*
* @param Scheduler $scheduler
* @return \Indatus\Dispatcher\Scheduling\Schedulable
*/
public function schedule(Schedulable $scheduler)
{
// Run every day at 9am.
return $scheduler->daily()->hours(9)->minutes(0);
}
/**
* When a command should run.
*
* @param Scheduler $scheduler
* @return \Indatus\Dispatcher\Scheduling\Schedulable
*/
public function schedule(Schedulable $scheduler)
{
// Run every day at 3am.
return $scheduler->opts([
'count' => 5000
])->daily()
->hours(3)
->minutes(0);
}
/**
* When a command should run.
*
* @param Scheduler $scheduler
* @return \Indatus\Dispatcher\Scheduling\Schedulable
*/
public function schedule(Schedulable $scheduler)
{
// Run every day at 3am.
return $scheduler->daily()->hours(3)->minutes(0);
}
from dispatcher.
I disabled all the commands (using isEnabled()
, if that makes a difference or not) and am still seeing the same issue. Might I need to actually remove the other commands/unregister them from Artisan and test again?
from dispatcher.
If you could try unregistering them one by one that would be great. Is this running on Windows or Linux?
If you could also verify the imports on your commands by looking for Indatus\\Diipatt
to figure out where that's coming from as well.
from dispatcher.
Will do, I'll do it tomorrow when I'm back at work. This is running on a Linux machine, using cPanel.
I'll double-check the imports as well. To be honest, I actually saw an example recently with some other code where the namespace was being all skewed, I never discovered why but it was unrelated to the problem. Really curious.
from dispatcher.
Did you have a chance to review this?
from dispatcher.
Apologies, was out of town for the remainder of the week. I'm going to try again by unregistering the commands one by one tomorrow and will report back.
from dispatcher.
Any luck on the source of the issue?
from dispatcher.
I have the same error, mentioned above ('Use of undefined constant STDOUT - assumed 'STDOUT'), if I perform ANY Artisan:call('XY') from somewhere in my application. Everything goes fine if I remove Indatus/Dispatcher from composer.json and the ServiceProvider from the providers-array.
I've tested it with a newly created and empty artisan command.
Any idea?
from dispatcher.
For those who're still suffering.. I was able to solve that Issue by putting those queue's inside the cron manually. I've been suffering that issue each time when I made artisan following up the queue untill I decided to make the queue's run by cron.
Somehow or something is blocking that php shell to act with the terminal which provides the error. When manually steering the queue via cron, it doesn't happens.
from dispatcher.
PHP only defines STDOUT when being run in cli. Seeing as Artisan::call()
is likely not being executed via cli I think that makes sense. This error is coming from the php-cli
dependency that Dispatcher only uses in the Cron driver when printing a cron summary: https://github.com/Indatus/dispatcher/blob/master/src/Indatus/Dispatcher/Drivers/Cron/ScheduleService.php . Are you running Artisan::call()
on a command scheduled with dispatcher?
It'd be helpful to see a project where this error occurs. Is it possible for you to grant me access or send some source code privately via email?
from dispatcher.
I've just sent you an email with the url.
Thx for help.
from dispatcher.
I haven't received that email.
from dispatcher.
Then I've got the wrong address. I took the one, mentioned at the end of the instruction slides.
from dispatcher.
Indatus is in the process of moving some servers this weekend which may be
affecting my email. Can you send it to [email protected] ?
On Sat, Jul 12, 2014 at 2:00 PM, erixx104 [email protected] wrote:
Then I've got the wrong address. I took the one, mentioned at the end of
the instruction slides.—
Reply to this email directly or view it on GitHub
#42 (comment).
Ben Kuhl
from dispatcher.
I've submitted a pull request to php-cli-tools to resolve this: wp-cli/php-cli-tools#57
from dispatcher.
I've pushed an update to the develop
branch that I believe will resolve this. Please update your composer to use this branch and see how that works for you.
from dispatcher.
Your update works. Artisan::call() works without problems. Scheduled Jobs still running. Everything seems to be fine to me!
from dispatcher.
Excellent! Since several of you guys were having this issue, can I get a 2nd confirmation from someone that this resolves the issue?
from dispatcher.
I can confirm this has been fixed in the develop branch
from dispatcher.
Thanks!
Issue is resolved with the latest release: https://github.com/Indatus/dispatcher/releases/tag/v1.3.1
from dispatcher.
Related Issues (20)
- running schedled:run from controller HOT 6
- different timings for different options of a command HOT 1
- api everyDays ? HOT 1
- Deploy on Windows. HOT 4
- --env does not get passed into the scheduled commands HOT 3
- Ask : i wanna use schedule for run php codes HOT 1
- Doesn't propagate --env flag HOT 5
- Different times in different environments HOT 2
- Hours set, will it run every minute and second? HOT 1
- php artisan schedule:summary Args/Opts column is blank? HOT 9
- removing command file causes scheduled:summary to crash HOT 1
- What sort of dependencies for Laravel does this project have? HOT 2
- Question: Laravel 5.x schedule:summary HOT 2
- Every Hours not running properly HOT 1
- [Feature] Task timeout HOT 1
- [Feature] pcntl_fork in leui of exec HOT 1
- Call to undefined method [package] HOT 1
- Class 'Orchestra\Testbench\TestCase' not found HOT 13
- Sleeping processes not being killed? HOT 5
- ERROR: exception 'InvalidArgumentException' with message 'Command "command:check" is not defined. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dispatcher.