Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto start after reboot #18

Open
shaahinhs opened this issue Jun 10, 2018 · 4 comments
Open

Auto start after reboot #18

shaahinhs opened this issue Jun 10, 2018 · 4 comments

Comments

@shaahinhs
Copy link

How to reboot the mtproxy.js file automatically?
or "pm2 start mtproxy.js -i max" command

-- I do not have much information from nodejs

@HavijTeam
Copy link

If You Use Windows Server You I Have One Way For Do This Bro.
First You Need To Open New Notepad File
Second Insert This Code In Your Notepad And Save With .bat
@ECHO pm2 start mtproxy.js_File_Address -i max echo Server Started pause
For Example:
@ECHO pm2 start C:\JSMTProxy\mtproxy.js -i max echo Server Started pause
Second You Need Open Command Prompt And Use This Code.
schtasks /create /sc onlogon /tn NAME /tr FILE_ADDRESS
Name: You Can Choose Any Name For Your Task
File_Address: Where Your Bat File Is There.
For Example:
schtasks /create /sc onlogon /tn MTProto /tr C:\Users\Administrator\Desktop\MTprotoLuncher.bat

@shaahinhs

@shaahinhs
Copy link
Author

shaahinhs commented Jun 10, 2018

@ErfanDevelop3r sorry , my OS centos 6.9

@gladiators1980
Copy link

After sure script is run
Type
#pm2 startup
#pm2 save

@alimami
Copy link

alimami commented Jun 15, 2018

@ErfanDevelop3r
unfortunately this method didn't work in windows server 2012 r2.

do you have any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants