Rafael 'Dido' Sevilla <[EMAIL PROTECTED]> wrote:
jepoy wrote:I just check the logs and it seems to be working properly. tnx for all the help, i'll be reading more on these. does it mean that cronjobs running on /etc/cron.hourly,cron.daily and the like works also the same as creating a cronjob let say run evry hour ? can i put the script here (etc/cron.hourly) instead of editing the root cronjob, like crontab -u root -e ?
> follow up question, im doing a backup script with help of crond. if i
> edit my root crontab will it affect my other cronjobs ? like for an
> example my clamav updates every hour.
> ill be using the root to run my backup cron jobs. when i check my crontab
> [EMAIL PROTECTED] home]# crontab -u root -l
> no crontab for root
>
> will this affect my other cronjobs running on root ?
Note that /etc/crontab is the main system crontab, not root's crontab.
While both will run as root they're considered distinct. Just to clear
out this possible source of confusion.
To answer your question, cron does no locking of resources on its own.
If one cron job writes something to a file and another cron job that
writes to the same file gets started while the first one isn't finished
yet, then obviously you'll have problems unless the two jobs do file
locking on their own. Usually though, this isn't an issue, and it's
often plainly obvious when it might be one. In your example, with your
clamav update and your backup scripts, unless you're trying to back up
the files clamav generates on update, you shouldn't have problems.
--
To err is human, but to foul things up takes a computer. And to make a
total disastrous mess takes a computer *operated* by a human.
http://stormwyrm.blogspot.com/
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph
Feb 17 13:01:01 mail crond[12784]: (root) CMD (run-parts /etc/cron.hourly)
Feb 17 13:05:01 mail crond[12950]: (root) CMD (/home/jcb/backup/backup.users.sh)
Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.
_________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

