What's the advantage of using a bash script for cron jobs?
- by AlxVallejo
From my understanding you can write your crons by editing
crontab -e
I've found several sources that instead refer to a bash script in the cron job, rather than writing a job line for line.
Is the only benefit that you can consolidate many tasks into one cron job using a bash script?
Additional question for a newbie: Editing crontab -e refers to one file correct? I've noticed that if I open crontab -e and close without editing, when I open the file again there is a different numerical extension such as:
"/tmp/crontab.XXXXk1DEaM" 0L, 0C
I though the crontab is stored in /var/spool/cron or /etc/crontab ??
Why would it store the cron in the tmp folder?