Is there a way to write/ run custom scripts in the background on my phone? What I have in mind is pretty simple. I want to write a small script for simple file managing, and I would like for it to be run automatically like once a day. I have some coding experience under my belt so the actual implementation won't really be a problem. What I'm actually confused about is if the Android platform has any features that would make executing the routines viable.
The bulk of the coding I do day-to-day is Python, but I could get used to Java or Kotlin's syntax in a couple days if necessary, and from there its just really simple logic. Considering that Android is really just Linux at the core, I imagine it would be possible to have it run a couple lines of code automatically everyday at a set time, as I have done on my linux machine a couple of times.
I'm pretty much a complete newbie when it comes to fiddling with Android's workings, so if anyone has done anything like what I'm  attempting or knows about relevant documentation, some guidance would be much appreciated.
No
On a non-rooted device, files are generally considered private to apps (think each app as a userid and you don't have sudo). Apps and their data are meant to be isolated from each other in the increasingly privacy focused mobile world.
As you have programming experience, here is the Android Developer documentation on data storage and you will note the different types such as media and &quot;documents&quot; using the Storage Access Framework. Add on Adoptable Storage for SD cards and you get experienced non-Android developers asking questions like What's the current status of Internal vs External vs Removable vs Adoptable Storage on Android?. Regardless, if your &quot;predetermined folder&quot; is a system one, without root you won't have access either.
The above SO question link to blog posts by Commonsware regarding the Android storage situation: internal storage, external storage, and removable storage as viewed from a developer perspective. Writing an app to interact with all of these storage types would be off-topic here in Android Enthusiasts but reading them gives context on how not like command line/shell Linux that Android has been and is becoming.