Bring a cronjab back to foreground
up vote
0
down vote
favorite
I've set a cronjob to upgrade my ubuntu in /etc/crontab:
0 2 * * 1 root apt update && apt upgrade -y >> /home/user/upgrade.txt 2>&1
Now, in ~/upgrade.txt
, this line is written:
What do you want to do about modified configuration file grub?
I want it to bring it back to my shell and enter 'Y'. How can i do this?
$ ps -ef | grep apt
root 2488 2484 0 02:00 ? 00:00:00 /bin/sh -c apt update && apt upgrade -y >> /home/user/upgrade.txt 2>&1
root 5426 2488 0 02:03 ? 00:00:30 apt upgrade -y
user 32202 28507 0 13:24 pts/8 00:00:00 grep --color=auto apt
telling that upgrade process is waiting for me to enter "Y" or "N", but I don't know how to bring it to my terminal. Does anyone have any idea?
command-line cron
add a comment |
up vote
0
down vote
favorite
I've set a cronjob to upgrade my ubuntu in /etc/crontab:
0 2 * * 1 root apt update && apt upgrade -y >> /home/user/upgrade.txt 2>&1
Now, in ~/upgrade.txt
, this line is written:
What do you want to do about modified configuration file grub?
I want it to bring it back to my shell and enter 'Y'. How can i do this?
$ ps -ef | grep apt
root 2488 2484 0 02:00 ? 00:00:00 /bin/sh -c apt update && apt upgrade -y >> /home/user/upgrade.txt 2>&1
root 5426 2488 0 02:03 ? 00:00:30 apt upgrade -y
user 32202 28507 0 13:24 pts/8 00:00:00 grep --color=auto apt
telling that upgrade process is waiting for me to enter "Y" or "N", but I don't know how to bring it to my terminal. Does anyone have any idea?
command-line cron
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've set a cronjob to upgrade my ubuntu in /etc/crontab:
0 2 * * 1 root apt update && apt upgrade -y >> /home/user/upgrade.txt 2>&1
Now, in ~/upgrade.txt
, this line is written:
What do you want to do about modified configuration file grub?
I want it to bring it back to my shell and enter 'Y'. How can i do this?
$ ps -ef | grep apt
root 2488 2484 0 02:00 ? 00:00:00 /bin/sh -c apt update && apt upgrade -y >> /home/user/upgrade.txt 2>&1
root 5426 2488 0 02:03 ? 00:00:30 apt upgrade -y
user 32202 28507 0 13:24 pts/8 00:00:00 grep --color=auto apt
telling that upgrade process is waiting for me to enter "Y" or "N", but I don't know how to bring it to my terminal. Does anyone have any idea?
command-line cron
I've set a cronjob to upgrade my ubuntu in /etc/crontab:
0 2 * * 1 root apt update && apt upgrade -y >> /home/user/upgrade.txt 2>&1
Now, in ~/upgrade.txt
, this line is written:
What do you want to do about modified configuration file grub?
I want it to bring it back to my shell and enter 'Y'. How can i do this?
$ ps -ef | grep apt
root 2488 2484 0 02:00 ? 00:00:00 /bin/sh -c apt update && apt upgrade -y >> /home/user/upgrade.txt 2>&1
root 5426 2488 0 02:03 ? 00:00:30 apt upgrade -y
user 32202 28507 0 13:24 pts/8 00:00:00 grep --color=auto apt
telling that upgrade process is waiting for me to enter "Y" or "N", but I don't know how to bring it to my terminal. Does anyone have any idea?
command-line cron
command-line cron
edited Nov 26 at 10:28
muru
135k19286485
135k19286485
asked Nov 26 at 9:59
Mohammad Kholghi
235
235
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
The short answer: You can't.
You will have to kill the running processes and run them manually from the terminal as:
sudo apt update && sudo apt upgrade -y
or without sudo
if you already are root.
add a comment |
up vote
0
down vote
You can try to use reptyr (also in ubuntu repos):
https://github.com/nelhage/reptyr
via
reptyr PID
(which you already have)
Couldn't help me with this problem, but thanks for sharing this perfect program:)
– Mohammad Kholghi
Nov 26 at 10:23
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The short answer: You can't.
You will have to kill the running processes and run them manually from the terminal as:
sudo apt update && sudo apt upgrade -y
or without sudo
if you already are root.
add a comment |
up vote
1
down vote
accepted
The short answer: You can't.
You will have to kill the running processes and run them manually from the terminal as:
sudo apt update && sudo apt upgrade -y
or without sudo
if you already are root.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The short answer: You can't.
You will have to kill the running processes and run them manually from the terminal as:
sudo apt update && sudo apt upgrade -y
or without sudo
if you already are root.
The short answer: You can't.
You will have to kill the running processes and run them manually from the terminal as:
sudo apt update && sudo apt upgrade -y
or without sudo
if you already are root.
edited Nov 26 at 14:18
waltinator
21.7k74169
21.7k74169
answered Nov 26 at 10:08
Soren A
3,2781824
3,2781824
add a comment |
add a comment |
up vote
0
down vote
You can try to use reptyr (also in ubuntu repos):
https://github.com/nelhage/reptyr
via
reptyr PID
(which you already have)
Couldn't help me with this problem, but thanks for sharing this perfect program:)
– Mohammad Kholghi
Nov 26 at 10:23
add a comment |
up vote
0
down vote
You can try to use reptyr (also in ubuntu repos):
https://github.com/nelhage/reptyr
via
reptyr PID
(which you already have)
Couldn't help me with this problem, but thanks for sharing this perfect program:)
– Mohammad Kholghi
Nov 26 at 10:23
add a comment |
up vote
0
down vote
up vote
0
down vote
You can try to use reptyr (also in ubuntu repos):
https://github.com/nelhage/reptyr
via
reptyr PID
(which you already have)
You can try to use reptyr (also in ubuntu repos):
https://github.com/nelhage/reptyr
via
reptyr PID
(which you already have)
answered Nov 26 at 10:07
janmyszkier
50827
50827
Couldn't help me with this problem, but thanks for sharing this perfect program:)
– Mohammad Kholghi
Nov 26 at 10:23
add a comment |
Couldn't help me with this problem, but thanks for sharing this perfect program:)
– Mohammad Kholghi
Nov 26 at 10:23
Couldn't help me with this problem, but thanks for sharing this perfect program:)
– Mohammad Kholghi
Nov 26 at 10:23
Couldn't help me with this problem, but thanks for sharing this perfect program:)
– Mohammad Kholghi
Nov 26 at 10:23
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096120%2fbring-a-cronjab-back-to-foreground%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown