Starting ./manage.py runworker in the backgroundIn Linux, how to prevent a background process from being stopped after closing SSH clientDjango - Set Up A Scheduled Job?Does Django scale?How to debug in Django, the good way?How does “cat << EOF” work in bash?Dude, where's my php.ini? (server config)How to run a shell script at startupHow to permanently set $PATH on Linux/Unix?Cutting the videos based on start and end time using ffmpegDocker command can't connect to Docker daemon
What Armor Optimization applies to a Mithral full plate?
Why is the Eisenstein ideal paper so great?
What weight should be given to writers groups critiques?
My players want to grind XP but we're using milestone advancement
How to patch glass cuts in a bicycle tire?
How can I tell if I'm being too picky as a referee?
What are the conditions for RAA?
Is there a simple example that empirical evidence is misleading?
Why does the hash of infinity have the digits of π?
Why isn't Tyrion mentioned in the in-universe book "A Song of Ice and Fire"?
How to cut a climbing rope?
Are black holes spherical during merger?
How to deal with a colleague who is being aggressive?
How can I make an argument that my time is valuable?
Did this character show any indication of wanting to rule before S8E6?
The art of clickbait captions
How to melt snow without fire or body heat?
Gravitational effects of a single human body on the motion of planets
I know that there is a preselected candidate for a position to be filled at my department. What should I do?
What was the idiom for something that we take without a doubt?
Can I install a back bike rack without attachment to the rear part of the frame?
Natural Armour and Weapons
Is the Unsullied name meant to be ironic? How did it come to be?
Best material to absorb as much light as possible
Starting ./manage.py runworker in the background
In Linux, how to prevent a background process from being stopped after closing SSH clientDjango - Set Up A Scheduled Job?Does Django scale?How to debug in Django, the good way?How does “cat << EOF” work in bash?Dude, where's my php.ini? (server config)How to run a shell script at startupHow to permanently set $PATH on Linux/Unix?Cutting the videos based on start and end time using ffmpegDocker command can't connect to Docker daemon
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I wanted to know what my options are of starting
./manage.py runworker
in the background. I tried doing this
python ./manage.py runworker 2>>./daphneWorker.log >&2
but that does not seem to work either. Any suggestions on how I can make it run in the background ?
django linux django-channels
|
show 1 more comment
I wanted to know what my options are of starting
./manage.py runworker
in the background. I tried doing this
python ./manage.py runworker 2>>./daphneWorker.log >&2
but that does not seem to work either. Any suggestions on how I can make it run in the background ?
django linux django-channels
Try to add & at the end. Should end like that "... >&2 &". If you need this command to outlive your terminal session, you should also add "nohup python..." at the beggining
– kravitz
Mar 24 at 1:07
I was not familiar with nohup ill have to look into that
– MistyD
Mar 24 at 1:13
It still seems to be running in the foreground. It moves to the background but then comes to the foreground to print something when an event occurs
– MistyD
Mar 24 at 1:52
you can either do./manage.py runworker >> log.log 2>&1
ornohup ./manage.py runworker
– Jibin Mathews
Mar 24 at 4:25
@JibinMathews I tried./manage.py runworker >> log.log 2>&1
this time the outputs being logged but its not running in the background
– MistyD
Mar 24 at 4:38
|
show 1 more comment
I wanted to know what my options are of starting
./manage.py runworker
in the background. I tried doing this
python ./manage.py runworker 2>>./daphneWorker.log >&2
but that does not seem to work either. Any suggestions on how I can make it run in the background ?
django linux django-channels
I wanted to know what my options are of starting
./manage.py runworker
in the background. I tried doing this
python ./manage.py runworker 2>>./daphneWorker.log >&2
but that does not seem to work either. Any suggestions on how I can make it run in the background ?
django linux django-channels
django linux django-channels
edited Mar 24 at 1:04
MistyD
asked Mar 24 at 0:46
MistyDMistyD
4,3961677149
4,3961677149
Try to add & at the end. Should end like that "... >&2 &". If you need this command to outlive your terminal session, you should also add "nohup python..." at the beggining
– kravitz
Mar 24 at 1:07
I was not familiar with nohup ill have to look into that
– MistyD
Mar 24 at 1:13
It still seems to be running in the foreground. It moves to the background but then comes to the foreground to print something when an event occurs
– MistyD
Mar 24 at 1:52
you can either do./manage.py runworker >> log.log 2>&1
ornohup ./manage.py runworker
– Jibin Mathews
Mar 24 at 4:25
@JibinMathews I tried./manage.py runworker >> log.log 2>&1
this time the outputs being logged but its not running in the background
– MistyD
Mar 24 at 4:38
|
show 1 more comment
Try to add & at the end. Should end like that "... >&2 &". If you need this command to outlive your terminal session, you should also add "nohup python..." at the beggining
– kravitz
Mar 24 at 1:07
I was not familiar with nohup ill have to look into that
– MistyD
Mar 24 at 1:13
It still seems to be running in the foreground. It moves to the background but then comes to the foreground to print something when an event occurs
– MistyD
Mar 24 at 1:52
you can either do./manage.py runworker >> log.log 2>&1
ornohup ./manage.py runworker
– Jibin Mathews
Mar 24 at 4:25
@JibinMathews I tried./manage.py runworker >> log.log 2>&1
this time the outputs being logged but its not running in the background
– MistyD
Mar 24 at 4:38
Try to add & at the end. Should end like that "... >&2 &". If you need this command to outlive your terminal session, you should also add "nohup python..." at the beggining
– kravitz
Mar 24 at 1:07
Try to add & at the end. Should end like that "... >&2 &". If you need this command to outlive your terminal session, you should also add "nohup python..." at the beggining
– kravitz
Mar 24 at 1:07
I was not familiar with nohup ill have to look into that
– MistyD
Mar 24 at 1:13
I was not familiar with nohup ill have to look into that
– MistyD
Mar 24 at 1:13
It still seems to be running in the foreground. It moves to the background but then comes to the foreground to print something when an event occurs
– MistyD
Mar 24 at 1:52
It still seems to be running in the foreground. It moves to the background but then comes to the foreground to print something when an event occurs
– MistyD
Mar 24 at 1:52
you can either do
./manage.py runworker >> log.log 2>&1
or nohup ./manage.py runworker
– Jibin Mathews
Mar 24 at 4:25
you can either do
./manage.py runworker >> log.log 2>&1
or nohup ./manage.py runworker
– Jibin Mathews
Mar 24 at 4:25
@JibinMathews I tried
./manage.py runworker >> log.log 2>&1
this time the outputs being logged but its not running in the background– MistyD
Mar 24 at 4:38
@JibinMathews I tried
./manage.py runworker >> log.log 2>&1
this time the outputs being logged but its not running in the background– MistyD
Mar 24 at 4:38
|
show 1 more comment
2 Answers
2
active
oldest
votes
I always use screen
tool for this kind of jobs. It is a virtual terminal that always run even if your ssh disconnected.
First use screen
command to create screen window within the same shell. It will display you bunch of info just press enter or spacebar. Than you come up with similar terminal of yours. Start your app in that terminal:
./manage.py runworker
now your app is running and you can detach from screen window with ctrl+a d
.
This will return you to your real terminal.
When you want to come back your detached screen window that is running in background just type screen -dr
or if you have multiple detached screen windows first list all of them with screen -ls
and than re attach the window you desire with screen -r [number_of_window]
. When you are done you can kill screen window with ctrl+a k
from inside the screen window.
add a comment |
You can use nohup
to keep it running in background.
nohup python manage.py runserver 0.0.0.0:80 &
nohup prevents the command from being aborted automatically when you
log out or exit the shell.
In order to stop the process running the server on port 80
netstat -nlp | grep :80
The above command gives you the processId or PID
Then:
kill PID
And in case you would like to log output
nohup python manage.py runserver 0.0.0.0:80 > myLog.out &
did u mean runworker instead of runserver ?
– MistyD
Mar 24 at 16:29
No. I meant runserver. But, what is runworker here?
– spiritsree
Mar 25 at 6:02
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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%2fstackoverflow.com%2fquestions%2f55319751%2fstarting-manage-py-runworker-in-the-background%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I always use screen
tool for this kind of jobs. It is a virtual terminal that always run even if your ssh disconnected.
First use screen
command to create screen window within the same shell. It will display you bunch of info just press enter or spacebar. Than you come up with similar terminal of yours. Start your app in that terminal:
./manage.py runworker
now your app is running and you can detach from screen window with ctrl+a d
.
This will return you to your real terminal.
When you want to come back your detached screen window that is running in background just type screen -dr
or if you have multiple detached screen windows first list all of them with screen -ls
and than re attach the window you desire with screen -r [number_of_window]
. When you are done you can kill screen window with ctrl+a k
from inside the screen window.
add a comment |
I always use screen
tool for this kind of jobs. It is a virtual terminal that always run even if your ssh disconnected.
First use screen
command to create screen window within the same shell. It will display you bunch of info just press enter or spacebar. Than you come up with similar terminal of yours. Start your app in that terminal:
./manage.py runworker
now your app is running and you can detach from screen window with ctrl+a d
.
This will return you to your real terminal.
When you want to come back your detached screen window that is running in background just type screen -dr
or if you have multiple detached screen windows first list all of them with screen -ls
and than re attach the window you desire with screen -r [number_of_window]
. When you are done you can kill screen window with ctrl+a k
from inside the screen window.
add a comment |
I always use screen
tool for this kind of jobs. It is a virtual terminal that always run even if your ssh disconnected.
First use screen
command to create screen window within the same shell. It will display you bunch of info just press enter or spacebar. Than you come up with similar terminal of yours. Start your app in that terminal:
./manage.py runworker
now your app is running and you can detach from screen window with ctrl+a d
.
This will return you to your real terminal.
When you want to come back your detached screen window that is running in background just type screen -dr
or if you have multiple detached screen windows first list all of them with screen -ls
and than re attach the window you desire with screen -r [number_of_window]
. When you are done you can kill screen window with ctrl+a k
from inside the screen window.
I always use screen
tool for this kind of jobs. It is a virtual terminal that always run even if your ssh disconnected.
First use screen
command to create screen window within the same shell. It will display you bunch of info just press enter or spacebar. Than you come up with similar terminal of yours. Start your app in that terminal:
./manage.py runworker
now your app is running and you can detach from screen window with ctrl+a d
.
This will return you to your real terminal.
When you want to come back your detached screen window that is running in background just type screen -dr
or if you have multiple detached screen windows first list all of them with screen -ls
and than re attach the window you desire with screen -r [number_of_window]
. When you are done you can kill screen window with ctrl+a k
from inside the screen window.
answered Mar 24 at 14:55
SeljukeSeljuke
4317
4317
add a comment |
add a comment |
You can use nohup
to keep it running in background.
nohup python manage.py runserver 0.0.0.0:80 &
nohup prevents the command from being aborted automatically when you
log out or exit the shell.
In order to stop the process running the server on port 80
netstat -nlp | grep :80
The above command gives you the processId or PID
Then:
kill PID
And in case you would like to log output
nohup python manage.py runserver 0.0.0.0:80 > myLog.out &
did u mean runworker instead of runserver ?
– MistyD
Mar 24 at 16:29
No. I meant runserver. But, what is runworker here?
– spiritsree
Mar 25 at 6:02
add a comment |
You can use nohup
to keep it running in background.
nohup python manage.py runserver 0.0.0.0:80 &
nohup prevents the command from being aborted automatically when you
log out or exit the shell.
In order to stop the process running the server on port 80
netstat -nlp | grep :80
The above command gives you the processId or PID
Then:
kill PID
And in case you would like to log output
nohup python manage.py runserver 0.0.0.0:80 > myLog.out &
did u mean runworker instead of runserver ?
– MistyD
Mar 24 at 16:29
No. I meant runserver. But, what is runworker here?
– spiritsree
Mar 25 at 6:02
add a comment |
You can use nohup
to keep it running in background.
nohup python manage.py runserver 0.0.0.0:80 &
nohup prevents the command from being aborted automatically when you
log out or exit the shell.
In order to stop the process running the server on port 80
netstat -nlp | grep :80
The above command gives you the processId or PID
Then:
kill PID
And in case you would like to log output
nohup python manage.py runserver 0.0.0.0:80 > myLog.out &
You can use nohup
to keep it running in background.
nohup python manage.py runserver 0.0.0.0:80 &
nohup prevents the command from being aborted automatically when you
log out or exit the shell.
In order to stop the process running the server on port 80
netstat -nlp | grep :80
The above command gives you the processId or PID
Then:
kill PID
And in case you would like to log output
nohup python manage.py runserver 0.0.0.0:80 > myLog.out &
answered Mar 24 at 15:26
spiritsreespiritsree
1,8801523
1,8801523
did u mean runworker instead of runserver ?
– MistyD
Mar 24 at 16:29
No. I meant runserver. But, what is runworker here?
– spiritsree
Mar 25 at 6:02
add a comment |
did u mean runworker instead of runserver ?
– MistyD
Mar 24 at 16:29
No. I meant runserver. But, what is runworker here?
– spiritsree
Mar 25 at 6:02
did u mean runworker instead of runserver ?
– MistyD
Mar 24 at 16:29
did u mean runworker instead of runserver ?
– MistyD
Mar 24 at 16:29
No. I meant runserver. But, what is runworker here?
– spiritsree
Mar 25 at 6:02
No. I meant runserver. But, what is runworker here?
– spiritsree
Mar 25 at 6:02
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f55319751%2fstarting-manage-py-runworker-in-the-background%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
Try to add & at the end. Should end like that "... >&2 &". If you need this command to outlive your terminal session, you should also add "nohup python..." at the beggining
– kravitz
Mar 24 at 1:07
I was not familiar with nohup ill have to look into that
– MistyD
Mar 24 at 1:13
It still seems to be running in the foreground. It moves to the background but then comes to the foreground to print something when an event occurs
– MistyD
Mar 24 at 1:52
you can either do
./manage.py runworker >> log.log 2>&1
ornohup ./manage.py runworker
– Jibin Mathews
Mar 24 at 4:25
@JibinMathews I tried
./manage.py runworker >> log.log 2>&1
this time the outputs being logged but its not running in the background– MistyD
Mar 24 at 4:38