'Will crontab run scripts on git branch master or main by default?

Excuse me if this post should be on a forum other than stack overflow.

On a linux cluster I am running a python script 24/7 to connect to a data stream, process it, and push it to a database. A crontab file is setup to monitor that the script is running and if it stops it will be started again.

I need to edit the script and test it, so created a git branch for that. I want to make sure that if the original script (on branch main) stops, the crontab will run it and not the modified file on the new branch.

My two questions are:

  1. Does crontab run scripts on main (or master) by default?
  2. How can I specify the git branch of file I want to run when calling it? (Mostly for verbosity)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source