Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-19-2007, 12:37 AM   #1
Registered: Oct 2007
Posts: 31

Rep: Reputation: 15
Thumbs up Making Cron entry through perl scripts

How to do crontab -e from perl script and make entry there!

I tried system();and tried to redirect line to it but its
not working;
Old 10-20-2007, 07:40 AM   #2
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Can I ask for a bit more detail about what you want to do? If you're actually trying to manipulate the time a cron job runs, then you could have the script bypass crontab and directly edit the crontab file. Of course you'd have to take extreme care not to bork the file otherwise cron won't understand it.

On the other hand, if you want to change what is being done, you're far better off setting up a shell script that the perl script edits and then having a crontab entry that runs that shell script at a given time. That way your perl script never has to worry about crontab.


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
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
will this cron entry do what I want it to? microsoft/linux Debian 4 01-12-2006 06:29 PM
Cron Entry tor updatedb? Snump Mandriva 3 10-02-2004 05:37 AM
making an entry in crontab through code (perl) akaash Programming 2 05-17-2004 03:36 AM
how to make a cron entry? (perl) akaash Programming 2 05-06-2004 02:15 AM

All times are GMT -5. The time now is 03:06 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