What's the advantage of using a bash script for cron jobs?
Posted
by
AlxVallejo
on Server Fault
See other posts from Server Fault
or by AlxVallejo
Published on 2012-04-09T19:58:52Z
Indexed on
2012/04/09
23:33 UTC
Read the original article
Hit count: 176
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?
© Server Fault or respective owner