Best way to define paths for a file running on a cron?

Sure, I'm open to change the description... @jake if you want to give me something specific to say, I'm more than happy to copy paste with attribution! I must admit that I really don't understand the mechanics of how here or thisfile work.

Another useful package that does this type of work is: https://github.com/rstudio/config

Little bit different from the R as a CLI and R scripts finding their working directory, but I've found the package to be a helpful way to solve the original if statement chaos.