"At" Command not running


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting "At" Command not running
# 1  
Old 07-25-2013
"At" Command not running

first off, i want to apologize because i know there is already a ton of information on the at command not to mention the Man pages... but i really cant find out whats wrong.. so mainly im creating a script in using dialog... one of the task that im making is to let the user input a command, input a time and then execute it using those inputs... heres

---------- Post updated at 08:10 PM ---------- Previous update was at 08:09 PM ----------

Code:
#!/bin/bash
echo -n "Enter the command you would like to schedule."
read Cmd
echo -n "Enter the Time you would like to execute the command. (In 24 Hour format please )"
read Time1
read -p "Enter 1 to execute!" option
case $option in
  1) at $Time1

So i dont know whats not working because the terminal just closes.. Thanks in advance.. sorry i dont know how to wrap the code around my script that i made

Last edited by Scott; 07-25-2013 at 05:55 AM.. Reason: However, wherever you posted that code from.... please don't!
# 2  
Old 07-25-2013
Can u use the code tag button for the code...the codes are not readable
# 3  
Old 07-25-2013
What are you running this in, how? I don't understand why your terminal would 'just close', bad script or not.

Code:
#!/bin/bash
echo -n "Enter the command you would like to schedule."
read Cmd
echo -n "Enter the Time you would like to execute the command. (In 24 Hour format please )"
read Time1
read -p "Enter 1 to execute!" option
case $option in
  1) at $Time1 ;;
esac


Last edited by Corona688; 07-25-2013 at 12:05 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

2. Shell Programming and Scripting

Problem with running the "autorep" command via crontab

Hi, The user "MadeInGermany" tried to help on the below post by saying "This has been asked before; see the links below. Get your current LD_LIBRARY_PATH and redefine that in your ksh script! " Thanks for the help. but this did not help. And my post got locked. I can't reply on my previous... (5 Replies)
Discussion started by: girish1428
5 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

5. HP-UX

script running with "ksh" dumping core but not with "sh"

Hi, I have small script written in korn shell. When it is called from different script, its dumping core, but no core dump when we run it standalone. And its not dumping core if we run the script using "/bin/sh" instead of "ksh" Can some body please help me how to resolve this issue. ... (9 Replies)
Discussion started by: simhe02
9 Replies

6. Shell Programming and Scripting

Command to find out "count" of running process ?

Hello Experts, Can any one help me out to find the command to get "count" of number of processes running in system. Basically i want to write one crone job to kill some process which making my system hanged. so have to do following things. 1) Find out the number of processes is running.... (4 Replies)
Discussion started by: MITESH KOTHARI
4 Replies

7. UNIX for Dummies Questions & Answers

running command "top" in cron

hi all, i would like to collect stat. about the cpu usage every 30 mins so, I set up the cron job sth like 0,30 * * * * * /usr/bin/top -d 1 >> $STAT i know cron doesn't have a TERM output, so error occurs. any ideas or work around for this?? many thanks (3 Replies)
Discussion started by: freddy1228
3 Replies

8. UNIX for Advanced & Expert Users

Running command "md5" on remote host not working.

My question is very strange. I can run ls command on remote host using ssh successfully. but when i try to run /sbin/md5 command on remote host. it doesnt run and get back to me on command prompt. md5 command is exist on remote host. This is what i tried which ran successfully. Query -... (1 Reply)
Discussion started by: ynilesh
1 Replies

9. Shell Programming and Scripting

Running "wall" command from cron

Hello, Ive written a little script that broadcasts a message if certain criteria are met. The script works fine when I run it. I entered it in the crontab to run every hour on the hour. The script executes, but the wall command doesnt seem to be executing correctly. I only have this... (1 Reply)
Discussion started by: xadamz23
1 Replies

10. UNIX for Dummies Questions & Answers

Problems running "at" command

I used to be able to run "at". Then I started getting "can't open job file in the /var/spool/cron/atjobs directory". Based on a newsgroup thread's advice, I logged in as root and entered "chmod 4755 /usr/bin/at" and then got "at: you are not authorized to use at. Sorry.". In trying to put... (4 Replies)
Discussion started by: cjhancock
4 Replies
Login or Register to Ask a Question