Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-10-2011, 11:17 PM   #1
LQ Newbie
Registered: Aug 2004
Location: NY
Distribution: Ubuntu,Red Hat,Centos 5
Posts: 29

Rep: Reputation: 0
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...
Old 03-11-2011, 05:04 AM   #2
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137

i did nearly the same in my rpm's for years without any problem. I cannot see any issue.
1 members found this post helpful.
Old 09-28-2012, 02:57 AM   #3
LQ Newbie
Registered: Sep 2012
Posts: 1

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


crontab, rpm, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [cron] Adding job through script? littlebigman Linux - Software 5 02-28-2011 06:31 AM
Add a custom-built rpm to a repository neildomo Red Hat 6 10-15-2008 09:11 PM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
Adding a custom RPM to Red Hat Satellite Builder Linux - Enterprise 1 09-08-2004 05:42 AM
adding a job to crontab via shell script tazio Linux - General 7 10-23-2003 02:44 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration