Create a bash script to create /etc/crontab

Job ID: 33970836

Budget: $10 – $30 USD

your task is to deliver a bash script which installs defines specific execution times for these entries
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 2 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 2 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 2 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

Story:
as a admin I want to have a organized cron execution times over all servers. I want to update them on one central file organized-crontab-exectimes.conf.
This file is a xml or a CSV, which contains the
- hostname
- the FQDN of the hostname,
- the cron type (hourly, daily, weekly, monthly, ...)
- and the corresponding execution times
- enabled or disabled flag, if this entry is managed by this script

logic:
if the hostname+fqdn is missing the file gets updated and the timings have to be defined by the admin
this is done by prompting the admin and showing the "current" crontab timings

if the hostname+fqdn is existing and matching, an update is getting executed and the admin is getting prompted with an timeout of 10 seconds, if he wants to modify the changes. After 10 seconds timeout, no change is done

if the delete operation is taken, the config file needs to be correspondingly update, by disabling the entry
the bash shall do:


your task is to:
- develop the bash script, fully documented
- you will need to test it on Ubuntu 20.04, 22.04, debian 11


you deliver a well documented/commented bash script with a description what is done in the next step to make reviews possible

you deliver into a git repo

Outlook
- if you do a good job on supporting our team, we are open to integrate you into regular work and we will share you more tasks like this

What is our budget?
we do not disclose our budget nor planned hourly rate. Offer us your best bid.
This job is created with a placeholder budget/rate. So ignore our rates/budgets and post your best bid.

Your bid?
Your placed bid is based on the fact, that you have read the job description and it is the upper bound on your bid.

Communication:
Do not wait for our availability here. Just answer, just ask or just reply.
Related categories: Linux Shell Script Bash Scripting