Sponsored Content
Top Forums Shell Programming and Scripting Rescheduling perl script using at command Post 302232095 by DILEEP410 on Wednesday 3rd of September 2008 10:43:09 PM
Old 09-03-2008
Java

Quote:
Originally Posted by Smiling Dragon
If it were me doing this script though, I'd probably have it go to sleep for 1800 seconds instead of using at like this, but I suspect it's just a matter of preferance Smilie
fine.But my question is if i go with your way of letting the script sleep for 1800 seconds, the entire code remains in memory for 30 minutes,right?
But if i reschedule it the memory will be free for 30 minutes.

Since the server is supposed to run a lot of cron jobs may be simultaneously,is better to think from memory perspective.

Please correct me if am wrong,because am not an expert in this!

With Regards
Dileep Pattayath
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how can call perl script as command?

Hello say i have written some perl scripts , now i like to call them in my unix shell as unix command like "more" , "ls" , "grep" so that my say perl script called "foo.pl" will be called from every where as "foo" or "foo arg1 arg2"? Thanks (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

get command alias name in perl script?

hi all, In my perl script, I need to know the command alias name to make my program flexible. I tried many methods like system("alias cmd"), `alias cmd`, use shell qw,etc. But no one could recognize the built in command alias. If I use `which cmd`, it would look for the command based on... (4 Replies)
Discussion started by: ktmchen
4 Replies

3. Shell Programming and Scripting

[Perl] Accessing array elements within a sed command in Perl script

I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows: $count = 0; while ( $count < $#test ) { `sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`; `cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies

4. UNIX for Advanced & Expert Users

Crontab Rescheduling

Hi, I want to weekly schedule a script execution (using crontab) but only if the system load is low. My question is: If the script does not be executed ( because of high load ) how can I re-schedule the cronjob to run after some minutes? I want the re-scheduling to be executed until the final... (1 Reply)
Discussion started by: tdakanalis
1 Replies

5. UNIX for Dummies Questions & Answers

Crontab Rescheduling

Hi, I want to weekly schedule a script execution (using crontab) but only if the system load is low. My question is: If the script does not be executed ( because of high load ) how can I re-schedule the cronjob to run after some minutes? I want the re-scheduling to be executed until the final... (1 Reply)
Discussion started by: tdakanalis
1 Replies

6. Shell Programming and Scripting

Crontab Rescheduling

Hi, I want to weekly schedule a script execution (using crontab) but only if the system load is low. My question is: If the script does not be executed ( because of high load ) how can I re-schedule the cronjob to run after some minutes? I want the re-scheduling to be executed until the final... (4 Replies)
Discussion started by: tdakanalis
4 Replies

7. Shell Programming and Scripting

Send "perl -e '...' " command through SSH, from a perl script

Hey guys I am trying to send a perl -e command to a number of systems using SSH. The command should retrieve some information for me. The problem is, the remote shell tries to interpolate my variables and doesn't get it should take the command literally and just execute it. Below the code.... (2 Replies)
Discussion started by: clrg
2 Replies

8. Shell Programming and Scripting

perl script command line option driven script

could someone show me a sample command line option driven script? i want to see an easy way to write one and how i can execute it using command line options such as typing in read.pl -i <id> -c <cmds> -s <start> -e <end> would read out all the commands run by ID . from start time to... (7 Replies)
Discussion started by: kpddong
7 Replies

9. Shell Programming and Scripting

perl/unix: script in command line works but not in perl

so in unix this command works works and shows me a list of directories find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt but when i try running a perl script to run this command my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies

10. Shell Programming and Scripting

Using UNIX command in perl script.

I wish to know if there is any limitation in using unix commands in perl script or it is just we should avoid using them in our perl script. For e.g Below is the command to get the recent file in a dir.: $lcsvFile = `cd "$l_inputfilepath";ls -1t *.CSV|tail -1` Is there any harm in coding... (1 Reply)
Discussion started by: Devesh5683
1 Replies
SLEEP(1)						    BSD General Commands Manual 						  SLEEP(1)

NAME
sleep -- suspend execution for an interval of time SYNOPSIS
sleep seconds DESCRIPTION
The sleep command suspends execution for a minimum of seconds. If the sleep command receives a signal, it takes the standard action. IMPLEMENTATION NOTES
The SIGALRM signal is not handled specially by this implementation. The sleep command will accept and honor a non-integer number of specified seconds (with a '.' character as a decimal point). This is a non- portable extension, and its use will nearly guarantee that a shell script will not execute properly on another system. EXIT STATUS
The sleep utility exits 0 on success, and >0 if an error occurs. EXAMPLES
To schedule the execution of a command for x number seconds later (with csh(1)): (sleep 1800; sh command_file >& errors)& This incantation would wait a half hour before running the script command_file. (See the at(1) utility.) To reiteratively run a command (with the csh(1)): while (1) if (! -r zzz.rawdata) then sleep 300 else foreach i (`ls *.rawdata`) sleep 70 awk -f collapse_data $i >> results end break endif end The scenario for a script such as this might be: a program currently running is taking longer than expected to process a series of files, and it would be nice to have another program start processing the files created by the first program as soon as it is finished (when zzz.rawdata is created). The script checks every five minutes for the file zzz.rawdata, when the file is found, then another portion processing is done courteously by sleeping for 70 seconds in between each awk job. SEE ALSO
nanosleep(2), sleep(3) STANDARDS
The sleep command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. HISTORY
A sleep command appeared in Version 4 AT&T UNIX. BSD
April 18, 1994 BSD
All times are GMT -4. The time now is 07:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy