avramovic / aws-cron-job Goto Github PK
View Code? Open in Web Editor NEWRun Laravel scheduled commands but only on a single EC2 instance
License: MIT License
Run Laravel scheduled commands but only on a single EC2 instance
License: MIT License
do i put this command in .ebextensions's config? or i still need to create cron.yaml? Thanks
Thanks for creating a package that is addressing AWS cron stuff in good way .
I have followed your guide and steps to use it.After completing it all it is executing on the server but it is throwing error as below .
Note : I am using 0.2.1 version of your package as i am using laravel 6.*
[stacktrace]
#0 /var/app/current/vendor/avram/aws-cron-job/src/Commands/AwsScheduleRunCommand.php(70): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined varia...', '/var/app/curren...', 70, Array)
#1 /var/app/current/vendor/avram/aws-cron-job/src/Commands/AwsScheduleRunCommand.php(47): Avram\AwsCronJob\Commands\AwsScheduleRunCommand->runIfEnabled()
#2 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Avram\AwsCronJob\Commands\AwsScheduleRunCommand->handle(Object(Illuminate\Console\Scheduling\Schedule), Object(Illuminate\Events\Dispatcher))
#3 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#4 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#5 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#6 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#7 /var/app/current/vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Illuminate\Container\Container->call(Array)
#8 /var/app/current/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#9 /var/app/current/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#10 /var/app/current/vendor/symfony/console/Application.php(1009): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/app/current/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Avram\AwsCronJob\Commands\AwsScheduleRunCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/app/current/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/app/current/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/app/current/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/app/current/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 {main}
"}
can you please guide me on this ..?
I set every env variables and the aws credentials are corrent. i also can run php artisan aws:schedule:run
.
If i try to login into my site i only get a blank white site.
i cleared the cache, views, and tried to config:cache...
Any idea how to fix this problem?
[2018-09-12 11:49:01] production.ERROR: Error executing "DescribeInstances" on "https://ec2.eu-west-1.amazonaws.com"; AWS HTTP error: Client error: `POST https://ec2.eu-west-1.amazonaws.com` resulted in a `401 Unauthorized` response:
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to val (truncated...)
AuthFailure (client): AWS was not able to validate the provided access credentials - <?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>6b437223-6e2f-41aa-9242-d9aad33dfa0a</RequestID></Response>
[2018-09-12 11:49:01] production.ERROR: Undefined offset: 0 {"exception":"[object] (ErrorException(code: 0): Undefined offset: 0 at /var/app/current/vendor/avram/aws-cron-job/src/Commands/AwsScheduleRunCommand.php:65)
[stacktrace]
#0 /var/app/current/vendor/sentry/sentry/lib/Raven/Breadcrumbs/ErrorHandler.php(34): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Undefined offse...', '/var/app/curren...', 65, Array)
#1 /var/app/current/vendor/avram/aws-cron-job/src/Commands/AwsScheduleRunCommand.php(65): Raven_Breadcrumbs_ErrorHandler->handleError(8, 'Undefined offse...', '/var/app/curren...', 65, Array)
#2 [internal function]: Avram\\AwsCronJob\\Commands\\AwsScheduleRunCommand->handle()
#3 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#4 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#5 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#6 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php(564): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#7 /var/app/current/vendor/laravel/framework/src/Illuminate/Console/Command.php(184): Illuminate\\Container\\Container->call(Array)
#8 /var/app/current/vendor/symfony/console/Command/Command.php(251): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#9 /var/app/current/vendor/laravel/framework/src/Illuminate/Console/Command.php(171): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#10 /var/app/current/vendor/symfony/console/Application.php(886): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#11 /var/app/current/vendor/symfony/console/Application.php(262): Symfony\\Component\\Console\\Application->doRunCommand(Object(Avram\\AwsCronJob\\Commands\\AwsScheduleRunCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#12 /var/app/current/vendor/symfony/console/Application.php(145): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#13 /var/app/current/vendor/laravel/framework/src/Illuminate/Console/Application.php(89): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#14 /var/app/current/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#15 /var/app/current/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#16 {main}
"}
is it required APP_ENV ?
on Amazon SQS Queue ?
Will you please answer it ?
I'm upgrading from laravel v9 to v10. But running into this error:
Do you have any plans to support Laravel 10?
First off, thanks for open sourcing your package. :)
Following your clear guide, I completed all steps in the setup. Now I'm at the final point in the readme. But it's not clear to me where to put the aws:schedule:run command. In the .ebextensions
folder, in a cron job in an instance, or somewhere else?
Would it be possible to add Laravel 9 support? From my understanding it's the illuminate/console package in composer.json that requires amending to include version 9.
We use redis to power our servers cache and would to have all cache stored there. Is there a reason we override to file storage?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.