Visit Jeremy's Blog.
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, 01: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, 08:40 AM   #2
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 420Reputation: 420Reputation: 420Reputation: 420Reputation: 420
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 09:16 AM
will this cron entry do what I want it to? microsoft/linux Debian 4 01-12-2006 07:29 PM
Cron Entry tor updatedb? Snump Mandriva 3 10-02-2004 06:37 AM
making an entry in crontab through code (perl) akaash Programming 2 05-17-2004 04:36 AM
how to make a cron entry? (perl) akaash Programming 2 05-06-2004 03:15 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:19 AM.

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