Reputation: 131
I have recently built a mobile app in React-Native along with its associated backend Laravel application / SQL database. The app and database have been tested on a locally hosted server and I am ready to deploy. I deployed the application and database to AWS Elastic Beanstalk following the tutorial
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-laravel-tutorial.html
The app was deployed successfully and I set up the DB as well in the Elastic Beanstalk Console.
The only problem was to run the schedule.
I have no idea of how to do it!
I tried to create a cron job following the
I created a cron.yaml file at the root of my project, like this.
version: 1
cron:
— name: "schedule"
url: "/schedule"
schedule: "0 */12 * * *"
And then I deployed it on AWS Elastic Beanstalk.
The configuration file cron.yaml in application version 69degrees-16 contains invalid YAML or JSON. YAML exception: Invalid Yaml: while parsing a block mapping in "", line 3, column 2: — name: "schedule" ^ expected , but found BlockMappingStart in "", line 4, column 4: url: "/schedule" ^ , JSON exception: Invalid JSON: Unexpected character (v) at position 0.. Update the configuration file.
In a word, what I want is to run the schedule on AWS. How can I do it?
Upvotes: 2
Views: 808
Reputation: 11
I had the same problem as you and I came across your subject empty of answer.
Finally, I found the solution! You need replace the character (em dash) —
by (hyphen-minus) -
. The difference is small but that's what corrected my mistake.
Upvotes: 1