How to use crontab to run the first python script after another?
I am new to this field. This is my first post at stackflow.
I am using crontab to run my traceroute code every 5 minutes, and using crontab function to generate the result to a text file. And I write another code to store the text files on google cloud bucket by renaming to associating timestamp. Everything seems to work when I executing my code manually.
The process would be having the traceroute result being printed to the text file completely and uploading to the gcp bucket. So the first thing came to my mind was using crontab to do the job. After the command being edited and deployed, traceroute result did generate to a text file but I did not see any files being uploaded to the cloud. Which I expected that the crontab command should run the first until its completed before running the second one. I do not know where I have done wrong or I really have to add a function to my traceroute code by outputing the result? It would be really appreciated if anyone can provide some advises. Thanks.
Contab command as below
*/5 * * * * python3 /path/to/traceroute/script.py domainame.com > /path/to/text/file/domainame.com.txt && python3 /path/to/uploading/gcp/bucket/script.py