'at' command intended behaviour? Launching each commands instead of scheduling

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
6
down vote

favorite
1












I'm trying to schedule the execution of some programs. I'm using this command:



./tests.o | at 15:00&


If I understood correctly, the intended behaviour was to delay execution until 15:00. However if I run top as soon as I launch the above command, I can see already tests.o eating CPU time.



Since I need to launch multiple tests on a shared resources I am wondering how to correctly use "at"?



What am I doing wrong?







share|improve this question









New contributor




Mick Hardins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 1




    This syntax (excluding & which is not needed) would be right if ./tests.o generated (printed to its stdout) the commands you want to run at 15:00.
    – Kamil Maciorowski
    Sep 8 at 14:24














up vote
6
down vote

favorite
1












I'm trying to schedule the execution of some programs. I'm using this command:



./tests.o | at 15:00&


If I understood correctly, the intended behaviour was to delay execution until 15:00. However if I run top as soon as I launch the above command, I can see already tests.o eating CPU time.



Since I need to launch multiple tests on a shared resources I am wondering how to correctly use "at"?



What am I doing wrong?







share|improve this question









New contributor




Mick Hardins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 1




    This syntax (excluding & which is not needed) would be right if ./tests.o generated (printed to its stdout) the commands you want to run at 15:00.
    – Kamil Maciorowski
    Sep 8 at 14:24












up vote
6
down vote

favorite
1









up vote
6
down vote

favorite
1






1





I'm trying to schedule the execution of some programs. I'm using this command:



./tests.o | at 15:00&


If I understood correctly, the intended behaviour was to delay execution until 15:00. However if I run top as soon as I launch the above command, I can see already tests.o eating CPU time.



Since I need to launch multiple tests on a shared resources I am wondering how to correctly use "at"?



What am I doing wrong?







share|improve this question









New contributor




Mick Hardins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










I'm trying to schedule the execution of some programs. I'm using this command:



./tests.o | at 15:00&


If I understood correctly, the intended behaviour was to delay execution until 15:00. However if I run top as soon as I launch the above command, I can see already tests.o eating CPU time.



Since I need to launch multiple tests on a shared resources I am wondering how to correctly use "at"?



What am I doing wrong?









share|improve this question









New contributor




Mick Hardins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Sep 8 at 21:27









Peter Mortensen

8,212166184




8,212166184






New contributor




Mick Hardins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Sep 8 at 13:30









Mick Hardins

332




332




New contributor




Mick Hardins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Mick Hardins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Mick Hardins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 1




    This syntax (excluding & which is not needed) would be right if ./tests.o generated (printed to its stdout) the commands you want to run at 15:00.
    – Kamil Maciorowski
    Sep 8 at 14:24












  • 1




    This syntax (excluding & which is not needed) would be right if ./tests.o generated (printed to its stdout) the commands you want to run at 15:00.
    – Kamil Maciorowski
    Sep 8 at 14:24







1




1




This syntax (excluding & which is not needed) would be right if ./tests.o generated (printed to its stdout) the commands you want to run at 15:00.
– Kamil Maciorowski
Sep 8 at 14:24




This syntax (excluding & which is not needed) would be right if ./tests.o generated (printed to its stdout) the commands you want to run at 15:00.
– Kamil Maciorowski
Sep 8 at 14:24










1 Answer
1






active

oldest

votes

















up vote
9
down vote



accepted










at reads commands from standard input. What you are doing is running ./tests.o and feeding its output string(s) as command(s) for at to schedule. Also, there is no need for the trailing &, as at returns immediately.



What you need is:



echo ./tests.o | at 15:00


or:



at 15:00 <<< ./tests.o


You will need to use quoting if you want the scheduled command to use redirection or other shell functions, eg:



at 15:00 <<< './tests.o > tests.log'





share|improve this answer




















  • Thanks, now i see what i was doing wrong. @KamilMaciorowski thanks for your clarification.
    – Mick Hardins
    Sep 8 at 14:27










  • @KamilMaciorowski - I often cross with other answers and comments, as I frequently realise there are things I should double-check while I'm writing my answer. I don't always remember to check before I post. Sorry to have pipped you at the post.
    – AFH
    Sep 8 at 14:46











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "3"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Mick Hardins is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1356411%2fat-command-intended-behaviour-launching-each-commands-instead-of-scheduling%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
9
down vote



accepted










at reads commands from standard input. What you are doing is running ./tests.o and feeding its output string(s) as command(s) for at to schedule. Also, there is no need for the trailing &, as at returns immediately.



What you need is:



echo ./tests.o | at 15:00


or:



at 15:00 <<< ./tests.o


You will need to use quoting if you want the scheduled command to use redirection or other shell functions, eg:



at 15:00 <<< './tests.o > tests.log'





share|improve this answer




















  • Thanks, now i see what i was doing wrong. @KamilMaciorowski thanks for your clarification.
    – Mick Hardins
    Sep 8 at 14:27










  • @KamilMaciorowski - I often cross with other answers and comments, as I frequently realise there are things I should double-check while I'm writing my answer. I don't always remember to check before I post. Sorry to have pipped you at the post.
    – AFH
    Sep 8 at 14:46















up vote
9
down vote



accepted










at reads commands from standard input. What you are doing is running ./tests.o and feeding its output string(s) as command(s) for at to schedule. Also, there is no need for the trailing &, as at returns immediately.



What you need is:



echo ./tests.o | at 15:00


or:



at 15:00 <<< ./tests.o


You will need to use quoting if you want the scheduled command to use redirection or other shell functions, eg:



at 15:00 <<< './tests.o > tests.log'





share|improve this answer




















  • Thanks, now i see what i was doing wrong. @KamilMaciorowski thanks for your clarification.
    – Mick Hardins
    Sep 8 at 14:27










  • @KamilMaciorowski - I often cross with other answers and comments, as I frequently realise there are things I should double-check while I'm writing my answer. I don't always remember to check before I post. Sorry to have pipped you at the post.
    – AFH
    Sep 8 at 14:46













up vote
9
down vote



accepted







up vote
9
down vote



accepted






at reads commands from standard input. What you are doing is running ./tests.o and feeding its output string(s) as command(s) for at to schedule. Also, there is no need for the trailing &, as at returns immediately.



What you need is:



echo ./tests.o | at 15:00


or:



at 15:00 <<< ./tests.o


You will need to use quoting if you want the scheduled command to use redirection or other shell functions, eg:



at 15:00 <<< './tests.o > tests.log'





share|improve this answer












at reads commands from standard input. What you are doing is running ./tests.o and feeding its output string(s) as command(s) for at to schedule. Also, there is no need for the trailing &, as at returns immediately.



What you need is:



echo ./tests.o | at 15:00


or:



at 15:00 <<< ./tests.o


You will need to use quoting if you want the scheduled command to use redirection or other shell functions, eg:



at 15:00 <<< './tests.o > tests.log'






share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 8 at 14:20









AFH

12.6k31835




12.6k31835











  • Thanks, now i see what i was doing wrong. @KamilMaciorowski thanks for your clarification.
    – Mick Hardins
    Sep 8 at 14:27










  • @KamilMaciorowski - I often cross with other answers and comments, as I frequently realise there are things I should double-check while I'm writing my answer. I don't always remember to check before I post. Sorry to have pipped you at the post.
    – AFH
    Sep 8 at 14:46

















  • Thanks, now i see what i was doing wrong. @KamilMaciorowski thanks for your clarification.
    – Mick Hardins
    Sep 8 at 14:27










  • @KamilMaciorowski - I often cross with other answers and comments, as I frequently realise there are things I should double-check while I'm writing my answer. I don't always remember to check before I post. Sorry to have pipped you at the post.
    – AFH
    Sep 8 at 14:46
















Thanks, now i see what i was doing wrong. @KamilMaciorowski thanks for your clarification.
– Mick Hardins
Sep 8 at 14:27




Thanks, now i see what i was doing wrong. @KamilMaciorowski thanks for your clarification.
– Mick Hardins
Sep 8 at 14:27












@KamilMaciorowski - I often cross with other answers and comments, as I frequently realise there are things I should double-check while I'm writing my answer. I don't always remember to check before I post. Sorry to have pipped you at the post.
– AFH
Sep 8 at 14:46





@KamilMaciorowski - I often cross with other answers and comments, as I frequently realise there are things I should double-check while I'm writing my answer. I don't always remember to check before I post. Sorry to have pipped you at the post.
– AFH
Sep 8 at 14:46











Mick Hardins is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















Mick Hardins is a new contributor. Be nice, and check out our Code of Conduct.












Mick Hardins is a new contributor. Be nice, and check out our Code of Conduct.











Mick Hardins is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1356411%2fat-command-intended-behaviour-launching-each-commands-instead-of-scheduling%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

List of Gilmore Girls characters

What does second last employer means? [closed]

One-line joke