Schedule a command to execute minutes later
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I tried to schedule a command to execute 2 minutes later
at -c "ls -l" now + 2 minutes
It fails with multiple ways
$ echo "open 'Google Chrome' " | at now + 2 minutes
job 15 at Mon Oct 29 13:31:42 2018
How could I enable it working?
run "open 'Google Chrome' " at now + 2 minutes
I tried, it is not working
$ at now
at>ls -l
at>^D
at> <EOT>
job 18 at Mon Oct 29 15:55:00 2018
bash osx
New contributor
Sawajiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
I tried to schedule a command to execute 2 minutes later
at -c "ls -l" now + 2 minutes
It fails with multiple ways
$ echo "open 'Google Chrome' " | at now + 2 minutes
job 15 at Mon Oct 29 13:31:42 2018
How could I enable it working?
run "open 'Google Chrome' " at now + 2 minutes
I tried, it is not working
$ at now
at>ls -l
at>^D
at> <EOT>
job 18 at Mon Oct 29 15:55:00 2018
bash osx
New contributor
Sawajiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
"It fails with multiple ways" - please provide specific errors rather then a general statement.
– roaima
2 hours ago
Is this on a Mac?
– roaima
2 hours ago
yes, this is on Mac @roaima
– Sawajiri
1 hour ago
"it is not working" how do you know it isn't working? What do you think should happen? What did you observe happening? What have you done about the discrepancy to try and resolve it?
– roaima
1 hour ago
Please do not post duplicates.
– l0b0
45 mins ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I tried to schedule a command to execute 2 minutes later
at -c "ls -l" now + 2 minutes
It fails with multiple ways
$ echo "open 'Google Chrome' " | at now + 2 minutes
job 15 at Mon Oct 29 13:31:42 2018
How could I enable it working?
run "open 'Google Chrome' " at now + 2 minutes
I tried, it is not working
$ at now
at>ls -l
at>^D
at> <EOT>
job 18 at Mon Oct 29 15:55:00 2018
bash osx
New contributor
Sawajiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I tried to schedule a command to execute 2 minutes later
at -c "ls -l" now + 2 minutes
It fails with multiple ways
$ echo "open 'Google Chrome' " | at now + 2 minutes
job 15 at Mon Oct 29 13:31:42 2018
How could I enable it working?
run "open 'Google Chrome' " at now + 2 minutes
I tried, it is not working
$ at now
at>ls -l
at>^D
at> <EOT>
job 18 at Mon Oct 29 15:55:00 2018
bash osx
bash osx
New contributor
Sawajiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sawajiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 36 mins ago
fpmurphy1
2,301915
2,301915
New contributor
Sawajiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 3 hours ago
Sawajiri
165
165
New contributor
Sawajiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sawajiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Sawajiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
"It fails with multiple ways" - please provide specific errors rather then a general statement.
– roaima
2 hours ago
Is this on a Mac?
– roaima
2 hours ago
yes, this is on Mac @roaima
– Sawajiri
1 hour ago
"it is not working" how do you know it isn't working? What do you think should happen? What did you observe happening? What have you done about the discrepancy to try and resolve it?
– roaima
1 hour ago
Please do not post duplicates.
– l0b0
45 mins ago
add a comment |Â
"It fails with multiple ways" - please provide specific errors rather then a general statement.
– roaima
2 hours ago
Is this on a Mac?
– roaima
2 hours ago
yes, this is on Mac @roaima
– Sawajiri
1 hour ago
"it is not working" how do you know it isn't working? What do you think should happen? What did you observe happening? What have you done about the discrepancy to try and resolve it?
– roaima
1 hour ago
Please do not post duplicates.
– l0b0
45 mins ago
"It fails with multiple ways" - please provide specific errors rather then a general statement.
– roaima
2 hours ago
"It fails with multiple ways" - please provide specific errors rather then a general statement.
– roaima
2 hours ago
Is this on a Mac?
– roaima
2 hours ago
Is this on a Mac?
– roaima
2 hours ago
yes, this is on Mac @roaima
– Sawajiri
1 hour ago
yes, this is on Mac @roaima
– Sawajiri
1 hour ago
"it is not working" how do you know it isn't working? What do you think should happen? What did you observe happening? What have you done about the discrepancy to try and resolve it?
– roaima
1 hour ago
"it is not working" how do you know it isn't working? What do you think should happen? What did you observe happening? What have you done about the discrepancy to try and resolve it?
– roaima
1 hour ago
Please do not post duplicates.
– l0b0
45 mins ago
Please do not post duplicates.
– l0b0
45 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
You misunderstand what the -c
option does. This option prints out the contents of the temporary file which is created by the at
command when a new at
job is created.
Here is one way to create a simple at
job:
$ at now + 2 minutes
at> ls -l
at> CTRL-D <---- Press Control Key + D Key simultaniously
at> <EOT>
job 2 at Mon Oct 29 03:34:00 2018
$
And here is the contents of the temporary file created by at
for thie job:
$ at -c 2
#!/bin/sh
# atrun uid=1000 gid=1000
# mail student 0
umask 2
XDG_VTNR=1; export XDG_VTNR
SSH_AGENT_PID=3010; export SSH_AGENT_PID
XDG_SESSION_ID=1; export XDG_SESSION_ID
.... lots more environment ....
cd /home/student ||
echo 'Execution directory inaccessible' >&2
exit 1
$SHELL:-/bin/sh << 'marcinDELIMITER689a131f'
ls -l
marcinDELIMITER689a131f
$
ty, I tried but not works as intended.
– Sawajiri
1 hour ago
@Sawajiri then please edit your question to tell us what you intend.
– roaima
1 hour ago
@Sawajiri. Exactly what did not work in the able example?
– fpmurphy1
40 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
You misunderstand what the -c
option does. This option prints out the contents of the temporary file which is created by the at
command when a new at
job is created.
Here is one way to create a simple at
job:
$ at now + 2 minutes
at> ls -l
at> CTRL-D <---- Press Control Key + D Key simultaniously
at> <EOT>
job 2 at Mon Oct 29 03:34:00 2018
$
And here is the contents of the temporary file created by at
for thie job:
$ at -c 2
#!/bin/sh
# atrun uid=1000 gid=1000
# mail student 0
umask 2
XDG_VTNR=1; export XDG_VTNR
SSH_AGENT_PID=3010; export SSH_AGENT_PID
XDG_SESSION_ID=1; export XDG_SESSION_ID
.... lots more environment ....
cd /home/student ||
echo 'Execution directory inaccessible' >&2
exit 1
$SHELL:-/bin/sh << 'marcinDELIMITER689a131f'
ls -l
marcinDELIMITER689a131f
$
ty, I tried but not works as intended.
– Sawajiri
1 hour ago
@Sawajiri then please edit your question to tell us what you intend.
– roaima
1 hour ago
@Sawajiri. Exactly what did not work in the able example?
– fpmurphy1
40 mins ago
add a comment |Â
up vote
2
down vote
You misunderstand what the -c
option does. This option prints out the contents of the temporary file which is created by the at
command when a new at
job is created.
Here is one way to create a simple at
job:
$ at now + 2 minutes
at> ls -l
at> CTRL-D <---- Press Control Key + D Key simultaniously
at> <EOT>
job 2 at Mon Oct 29 03:34:00 2018
$
And here is the contents of the temporary file created by at
for thie job:
$ at -c 2
#!/bin/sh
# atrun uid=1000 gid=1000
# mail student 0
umask 2
XDG_VTNR=1; export XDG_VTNR
SSH_AGENT_PID=3010; export SSH_AGENT_PID
XDG_SESSION_ID=1; export XDG_SESSION_ID
.... lots more environment ....
cd /home/student ||
echo 'Execution directory inaccessible' >&2
exit 1
$SHELL:-/bin/sh << 'marcinDELIMITER689a131f'
ls -l
marcinDELIMITER689a131f
$
ty, I tried but not works as intended.
– Sawajiri
1 hour ago
@Sawajiri then please edit your question to tell us what you intend.
– roaima
1 hour ago
@Sawajiri. Exactly what did not work in the able example?
– fpmurphy1
40 mins ago
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You misunderstand what the -c
option does. This option prints out the contents of the temporary file which is created by the at
command when a new at
job is created.
Here is one way to create a simple at
job:
$ at now + 2 minutes
at> ls -l
at> CTRL-D <---- Press Control Key + D Key simultaniously
at> <EOT>
job 2 at Mon Oct 29 03:34:00 2018
$
And here is the contents of the temporary file created by at
for thie job:
$ at -c 2
#!/bin/sh
# atrun uid=1000 gid=1000
# mail student 0
umask 2
XDG_VTNR=1; export XDG_VTNR
SSH_AGENT_PID=3010; export SSH_AGENT_PID
XDG_SESSION_ID=1; export XDG_SESSION_ID
.... lots more environment ....
cd /home/student ||
echo 'Execution directory inaccessible' >&2
exit 1
$SHELL:-/bin/sh << 'marcinDELIMITER689a131f'
ls -l
marcinDELIMITER689a131f
$
You misunderstand what the -c
option does. This option prints out the contents of the temporary file which is created by the at
command when a new at
job is created.
Here is one way to create a simple at
job:
$ at now + 2 minutes
at> ls -l
at> CTRL-D <---- Press Control Key + D Key simultaniously
at> <EOT>
job 2 at Mon Oct 29 03:34:00 2018
$
And here is the contents of the temporary file created by at
for thie job:
$ at -c 2
#!/bin/sh
# atrun uid=1000 gid=1000
# mail student 0
umask 2
XDG_VTNR=1; export XDG_VTNR
SSH_AGENT_PID=3010; export SSH_AGENT_PID
XDG_SESSION_ID=1; export XDG_SESSION_ID
.... lots more environment ....
cd /home/student ||
echo 'Execution directory inaccessible' >&2
exit 1
$SHELL:-/bin/sh << 'marcinDELIMITER689a131f'
ls -l
marcinDELIMITER689a131f
$
answered 1 hour ago
fpmurphy1
2,301915
2,301915
ty, I tried but not works as intended.
– Sawajiri
1 hour ago
@Sawajiri then please edit your question to tell us what you intend.
– roaima
1 hour ago
@Sawajiri. Exactly what did not work in the able example?
– fpmurphy1
40 mins ago
add a comment |Â
ty, I tried but not works as intended.
– Sawajiri
1 hour ago
@Sawajiri then please edit your question to tell us what you intend.
– roaima
1 hour ago
@Sawajiri. Exactly what did not work in the able example?
– fpmurphy1
40 mins ago
ty, I tried but not works as intended.
– Sawajiri
1 hour ago
ty, I tried but not works as intended.
– Sawajiri
1 hour ago
@Sawajiri then please edit your question to tell us what you intend.
– roaima
1 hour ago
@Sawajiri then please edit your question to tell us what you intend.
– roaima
1 hour ago
@Sawajiri. Exactly what did not work in the able example?
– fpmurphy1
40 mins ago
@Sawajiri. Exactly what did not work in the able example?
– fpmurphy1
40 mins ago
add a comment |Â
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478348%2fschedule-a-command-to-execute-minutes-later%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
"It fails with multiple ways" - please provide specific errors rather then a general statement.
– roaima
2 hours ago
Is this on a Mac?
– roaima
2 hours ago
yes, this is on Mac @roaima
– Sawajiri
1 hour ago
"it is not working" how do you know it isn't working? What do you think should happen? What did you observe happening? What have you done about the discrepancy to try and resolve it?
– roaima
1 hour ago
Please do not post duplicates.
– l0b0
45 mins ago