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 05-05-2004, 06:03 AM   #1
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 to be executed daily,weekly and monthly at some time .

How can i do this using perl code?
Old 05-05-2004, 09:03 AM   #2
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/ and call it directly from your crontab or use the command 'perl /path/to/'

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/
# weekly, sunday 4pm
0 4 * * 0 /path/to/
# first of the month, 12pm (already one at 12am)
0 12 1 * * /path/to/
Old 05-06-2004, 03:15 AM   #3
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?


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

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