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

Quote:
Originally Posted by Smiling Dragon
The -f flag to 'at' is to specify a list of commands to be run, you're passing your perl script as if it should be executed in shell, line by line.
You want to provide the perl script itself as the command to execute.

[edit] To pass it on the commandline, echo the job into at and leave out the -f flag:
Code:
echo '/home/dileepp/scripts/ftp_file.pl 1> /home/dileepp/logs/ftp_file.log 2> /home/dileepp/logs/ftp_file.log' | at now + 30 minutes

Note that the 'now + 30 minutes' thing doesn't work on my version of at but you still should be ok with this syntax
It's working fine.Thanks Smiling Dragon
 

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
service(8)						      System Manager's Manual							service(8)

NAME
service - run a System V init script SYNOPSIS
service SCRIPT COMMAND [OPTIONS] service --status-all service --help | -h | --version DESCRIPTION
service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /. The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT. The supported values of COMMAND depend on the invoked script, service passes COMMAND and OPTIONS it to the init script unmodified. All scripts should support at least the start and stop commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start command. service --status-all runs all init scripts, in alphabetical order, with the status command. EXIT CODES
service calls the init script and returns the status returned by it. FILES
/etc/init.d The directory containing System V init scripts. ENVIRONMENT
LANG, TERM The only environment variables passed to the init scripts. SEE ALSO
/etc/init.d/skeleton, update-rc.d(8), init(8), invoke-rc.d(8). Jan 2006 service(8)
All times are GMT -4. The time now is 12:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy