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:

Does crontab run scripts on main (or master) by default?
How can I specify the git branch of file I want to run when calling it? (Mostly for verbosity)
Crontab will run on a file, so, whatever state the local repo is in, whether it's updated with main/master or pulled to another branch, or edited locally, it will run that file.
If you want to explicitly run a particular branch, my advice is to point cron at a separate script, which could take the branch as a parameter, that will then prepare the script location however you want, and subsequently run it.
Will crontab run scripts on git branch master or main by default?