JSMTProxy icon indicating copy to clipboard operation
JSMTProxy copied to clipboard

Auto start after reboot

Open shaahinhs opened this issue 7 years ago • 4 comments

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

-- I do not have much information from nodejs

shaahinhs avatar Jun 10 '18 08:06 shaahinhs

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

HavijTeam avatar Jun 10 '18 10:06 HavijTeam

@ErfanDevelop3r sorry , my OS centos 6.9

shaahinhs avatar Jun 10 '18 11:06 shaahinhs

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

gladiators1980 avatar Jun 12 '18 19:06 gladiators1980

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

do you have any suggestions?

alimami avatar Jun 15 '18 17:06 alimami