LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-17-2010, 12:08 PM   #1
stacymez
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
at command not running 'today'


Hi all,

I am trying to use the at command to run a script file. The test was quite simple, wanted to run today and every 2 days.

Here is the at command:
at 15:20 today + 2 days -f every2daysDo.sh

Here is the script:
echo "every2daysDo.sh ran on $(date)" >> /home/stacy/attest.log

I see the 'output' of the echo command in my log file on today+2 days, but not on the day that I start it.

Any ideas what I am missing?

Thanks,
Stacy
 
Old 11-17-2010, 12:12 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, welcome to LQ!

And you're missing a basic understanding of "at".

At is used to run one-offs, so you can't schedule
two events w/ one at command.

You want it to run twice, you issue it twice.


Cheers,
Tink
 
Old 11-17-2010, 01:20 PM   #3
stacymez
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
I'm so sorry, now I see that, I ran across an example (which I can't seem to find now) that indicated otherwise.

Thanks for the help
 
Old 11-17-2010, 02:34 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by stacymez View Post
I'm so sorry, now I see that, I ran across an example (which I can't seem to find now) that indicated otherwise.

Thanks for the help
Don't be. We all live and learn. :}



Cheers,
Tink
 
  


Reply


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
Does Kornshell wait until one command completes before running the next command? ShaqDiesel Programming 4 09-11-2008 12:49 AM
getting updates today is IMPOSSIBLE (today)!! mtdew3q SUSE / openSUSE 3 10-17-2007 01:53 AM
Samba wasn't running - checked log file today duality Red Hat 1 07-24-2004 02:52 AM
Running a command from anywhere tez Linux - Newbie 5 02-27-2004 11:07 PM
command running on cd in Daem0hn Linux - General 3 07-22-2003 04:13 AM


All times are GMT -5. The time now is 08:35 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration