Is the goal here to have the files execute exactly two minutes apart, or are you hoping to have one job just finish before the other executes?
If you are solely concerned with script1
finishing before script2
, crontab should be able to do this in cronjob with a command like this:
script1 && script2
There is a decent example of this in the comments of this Reddit post.
If you do in fact want to have the scripts execute exactly 2 minutes apart, maybe you could approach by setting a specific execution time? Of course this may be somewhat sensitive to failures / not the most robust method, so adding some sort of event listener, etc. might be a better option.
Hope this helps a little bit!