I'm trying to create a task on Unix similar to a task of Task Scheduler in Windows which will run at specific times of the day and even gets triggered after server restarts. Aim of this job is to execute a python file. My question is two parts:
1). How to write a job which I can schedule at multiple times of the day. I tried to write cron job using crontab command but it gives You <user> are not allowed to access to (crontab) because of pam configuration. I would like to know a way where I can schedule the triggering of python script without needing root/admin rights.
2). How can I schedule a job whose scheduling stays in effect even after the server is restarted. While going through various resources, I found systemd, using which we can use to start and stop the services. For example, https://linuxconfig.org/how-to-write-a-simple-systemd-service#:~:text=%20How%20To%20Write%20A%20Simple%20Systemd%20Service,section%20that%20you%20need%20to%20w...%20More%20
.But I'm unable to find how i can write a service script which will run my python script.
Can someone please guide on how can I run a job which executes my python script a some specific times of day and keeps working even after server bounce.