LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 10-19-2007, 12:37 AM   #1
devkpict
Member
 
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
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,790
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
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.
 
  


Reply


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 02:57 PM.

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