aws / aws/aws-codedeploy-agent
[Issue] : cron job not running as expected after CodeDeploy changes the code in EC2 using CodePipeline
- Vorherrschende Sprache
- Rust
- Sterne
- 337
- Forks
- 195
- Ø Merge
- 10 Std. 54 Min.
- Gemergte PRs (30 T.)
- 4
Beschreibung
Here is my root crontab file contents:
```
@reboot sudo systemctl start codedeploy-agent
43 14 * * * cd /home/ec2-user/DeltaNeutral_Live && source ./delta/bin/activate && python3 001automate_token_fyers.py && python3 fyers_test.py >> /home/ec2-user/DeltaNeutral_Live/cron.log 2>&1
10 10 * * * pkill -f "python3 fyers_test.py"
```
Crontab commands does not run as expected.
Also i have made a Code Pipeline where Code Deploy is connected. As soon as i commit the code, source takes the latest commit and passes to Code Deploy, Also the files in EC2 changes as per the latest commit. But cron job does not do its job as mentioned.
Also if i manually use the command in command prompt, then logging in as ec2-user which is default for aws linux, the command runs as expected. But the same does not runs as expected in cron job.
Please help me with this issue.
Beitragsleitfaden
Rechercherichtung
Beginnen Sie mit den root-Crontab-Einträgen und /home/ec2-user/DeltaNeutral_Live/cron.log und vergleichen Sie anschließend deren Ausführung mit den manuell ausgeführten Befehlen, nachdem CodeDeploy EC2 aktualisiert hat. Erledigt ist es, wenn beide geplanten Python-Befehle erfolgreich mit den zuletzt bereitgestellten Dateien ausgeführt werden und sich der Eintrag zur Prozessbeendigung wie vorgesehen verhält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, linux, python
- Bereich
- cloud, devops, infrastructure
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100