-   Programming (
-   -   Adding job from a script(Custom built RPM) (

glennt11 03-10-2011 11:17 PM

Adding job from a script(Custom built RPM)
SO I'm checking in after all these years away to see if anyone has a better way of doing this...

I'm building an RPM that requires adding a cron job into a user's(service account) crontab...from what I see in the manpages, this isn't possible, as the only viable option is to replace the crontab entries already there for previous scripts being run...

Either way, as an example I've found I can make it work by directly modifying the crontab file using:


echo "* * * * * /bin/ls -la ~/ >> ~/ls.log" >> /var/spool/cron/userName
I'd just like to know, is there any MAJOR issues with modifying a the crontabs like this?

This is running on a Redhat Enterprise Linux server by the way...

mesiol 03-11-2011 05:04 AM


i did nearly the same in my rpm's for years without any problem. I cannot see any issue.

Test1 09-28-2012 02:57 AM

@mesiol : Can you please share the script how you are doing it with RPM?

All times are GMT -5. The time now is 09:26 PM.