LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 05-05-2004, 05:03 AM   #1
akaash
LQ Newbie
 
Registered: Mar 2004
Location: Gujarat, India
Posts: 22

Rep: Reputation: 15
how to make a cron entry? (perl)


I want to make an entry in cron.

I want to execute a script called abc.pl to be executed daily,weekly and monthly at some time .

How can i do this using perl code?
 
Old 05-05-2004, 08:03 AM   #2
rkef
Member
 
Registered: Mar 2004
Location: bursa
Posts: 110

Rep: Reputation: 15
Are you saying that you just want to run a certain Perl script via cron? I don't see any reason to use a Perl script to actually make the entry, unless you're specifically making some generalized, friendlier interface to editing crontabs.

You can add Perl scripts just like you'd add anything else: either make the script executable (chmod u+x /path/to/script.pl) and call it directly from your crontab or use the command 'perl /path/to/script.pl'

So you want it to run once daily, twice on sunday, and once at the end of the month (or something similar)? You'll have to specify a time for each of those, I believe. I would use three separate entries.

# daily, 12am
0 0 * * * /path/to/script.pl
# weekly, sunday 4pm
0 4 * * 0 /path/to/script.pl
# first of the month, 12pm (already one at 12am)
0 12 1 * * /path/to/script.pl
 
Old 05-06-2004, 02:15 AM   #3
hitesh29
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
i want to do those entries in crontab using perl code...

how can i do that?
 
  


Reply



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
script automatically add entry in cron daemon? Thinking Linux - General 1 03-30-2005 05:27 AM
Cron problems with perl slice Linux - Newbie 1 02-21-2005 10:49 AM
printing Spanish accent characters in Perl/tk entry widget puedo Programming 1 02-19-2005 01:16 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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:17 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration