How to start a long running program at system start and stop at login and restart at logoff

I am trying to mine some crypto currency with my computer. My computer is usually in logged off state, so I want to mine automatically when system is in this state.
Untill now I have done this:
At system start, I have scheduled a task to start the mining software
at login I have scheduled another task to kill the mining process
Here comes the question: I need to restart the mining process as soon as the user logs off.
But I couldnt figure out how to schedule a task at logoff, so I decided to use Group Policy Ediotr's Logoff scripts. But the problem is, I can't seem to log off at all, because system seems to be waiting for the "script" to finish, and since it is
a mining process, it doesn't finish, and the user is never logged off!
How do I configure windows to resume mining after the logoff?

Hi!
I haven't been working much with mining, but you are thinking correctly with using the logon/logoff-scripts.
The problem is that the process for mining requires a user to be logged on, it runs i user-context.
So if you in some way can start the process to run in system context, you are good to go. (The mining process) But if this is possible at all I do not know, I think the miners are dependent on a user being logged on.
Best regards
Andreas Molin
Andreas Molin | Site: www.guidestomicrosoft.com | Twitter: andreas_molin

Similar Messages

  • Does win8/8.1/10 kill long-running programs automatically as stated in specs? reasons why?

    does win8/8.1/10 kill/end-task long-running programs automatically as stated in specs? how specifically does it detect a locked-up process?
    has this been put into windows 7 at any time to make it similar to windows 8?
    Please supply accurate answers. thank you.
    My understanding the reason for this change was to handle locked-up programs.
    I do have a number of long-running processes. some examples of mine and scenarios for other users:
    simulations on a Workstation or HPC Server
    doing a directory tree walk on a hard disk with >=1TB of data
    reference articles I have found on the subject:
    windows 7
    http://windows.microsoft.com/en-us/windows/exit-program-not-responding#1TC=windows-7
    windows 8
    From some of what I understand, you can also get the "Program Not Responding" or similarly titled dialog box when:
    bug in the source code of the program in question. for instance, while(1){} such as forever loops (win7)
    similar program bug when declaring a function one way but defining it a different way and then calling it (mismatch in function signature) (win7)
    similar to above with DLLs in using MSVCRT*.DLL or other
    (?) can't remember for sure on this, but I think some badly formed calls or it was invalid values or data type mismatch to Win32 API can do this from buggy code. (win7)
    for (x=0; x < 16777216; x++) {your code here...} in other words, large values for loop termination (win7)
    this is a repost of http://answers.microsoft.com/en-us/windows/forum/windows_8-performance/does-win88110-kill-long-running-programs/d35c3c9e-c6f4-4bbf-846a-2041bf2167a0?tm=1427518759476
    here due to a request to do so.

    does win8/8.1/10 kill/end-task long-running programs automatically as stated in specs? how specifically does it detect a locked-up process?
    has this been put into windows 7 at any time to make it similar to windows 8?
    Please supply accurate answers. thank you.
    My understanding the reason for this change was to handle locked-up programs.
    Hi Jim,
    First, I have to admit that I'm not fully understanding the question, If a program is not responding, it means the program is interacting more slowly than usual with Windows, typically could be a confliction of software or hardware resources between
    two programs, lack of system resources, or a bug in the software or drivers. In that case, we can choose to wait or end the program. This design is similiar in Windows 7, Windows 8 and other OS.
    For deeper analysis, system determines whether the system considers that a specified application is not responding using a "IsHungAppWindow function",
    https://msdn.microsoft.com/en-us/library/ms633526.aspx
    And this link also give some explanation: Preventing Hangs in Windows Applicationshttps://msdn.microsoft.com/en-us/library/windows/desktop/dd744765%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
    While I'm not a developer, to better understand this, I recommend you contact members in the MSDN Forum:
    https://social.msdn.microsoft.com/Forums/en-US/home
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Challenging question: Status report for long running program...

    Hi All,
    With all the control stuff around like cl_dd_document I was wondering if there is a way to give a user a report which shows the progress of a very long running program?
    i.e. If I have a 20 step process and each step takes 1 minute, the following is what I would like to occur:
    Output a status line in a report format, run step, repeat until all steps are finished.
    This is similar to the status bar, but with a history of what is happening.  Obviously scrolling needs to be considered also.  Ideally it would behave like sapinst would but in a reporting format.
    Obviously this has to bypass the PBO/PAI approach, hence why I believe UI Controls must be the answer.
    Any ideas anyone?
    Regards,
    Matt

    Without using a control, you could try the old report refresh trick using set user-command and an action triggered after an RFC in a new task ... see basic demo below:
    report zlocal_auto_refresh no standard page heading.
    data:
      begin of gs_step,
        uzeit               like sy-uzeit,
        step                like sy-tabix,
        start_end(10)       type c,
      end of gs_step,
      gt_step               like gs_step occurs 10,
      g_step_number         like sy-tabix.
    *=======================================================================
    * Events
    *=======================================================================
    at user-command.
      perform user_command.
    *=======================================================================
    * Mainline
    *=======================================================================
    start-of-selection.
      perform start_of_report.
    end-of-selection.
    *&      Form  start_of_report
    form start_of_report.
      set pf-status '1000LIST'. "contains ZREFRESH ucomm
      perform run_a_step.
    endform.                    "start_of_report
    *&      Form  run_a_step
    form run_a_step.
    * Demo with something that takes some time, like sleeping...
      data:
        ls_step             like gs_step.
      add 1 to g_step_number.
      if g_step_number > 9.
        stop.
      endif.
      get time.
      clear: ls_step.
      ls_step-step      = g_step_number.
      ls_step-uzeit     = sy-uzeit.
      ls_step-start_end = 'Starting'.
      append ls_step to gt_step.
    * generate a delay for demo
      call function 'ENQUE_SLEEP'
        exporting
          seconds = 1
        exceptions
          others  = 0.
      get time.
      clear: ls_step.
      ls_step-step      = g_step_number.
      ls_step-uzeit     = sy-uzeit.
      ls_step-start_end = 'Ended'.
      append ls_step to gt_step.
      format reset.
      format color col_normal.
      loop at gt_step into ls_step.
        write: /
          ls_step-uzeit,
          ls_step-start_end,
          ls_step-step,
          at sy-linsz space.
      endloop.
      uline.
      call function 'RFC_PING'
        starting new task 'NEWTASK'
        performing when_back on end of task.
    endform.                    "run_a_step
    *&      Form  when_back
    form when_back
      using
        i_taskname          type any.
      receive results from function 'RFC_PING'.
      set user-command 'ZREFRESH'. "act like user pressed something
    endform.                    "when_back
    *&      Form  user_command
    form user_command.
      case sy-ucomm.
        when 'ZREFRESH'.
          perform run_a_step.
          sy-lsind = sy-lsind - 1.
      endcase.
    endform.                    "user_command
    cheers
    jc

  • How to research a long running job from 3 days ago

    Re: How to research a long running job from 3 days ago
    Client called to say that a job that normally runs for 6 hours ran for 18 hours on 11/01. 11/01 was a Saturday, and end of month. The long running job writes to a log and I can from the log that that the problem started right around 10:43am. Every step
    before 10:43 was taking the normal amount of time. Then at 10:43 a step that takes seconds hung for 12 hours. After 12 hours the step finished and the job completed successfully.
    I looked at the SQL Log, Event Log, Job History (for all jobs). What else can I look at to try and resolve an issue that happened on 11/01/2014?

    It does execute an SSIS package.
    Personally I feel this as kind of bug in SSIS package but I am not expert in SSIS so I would move it to SSIS forum. Please update your question giving complete information what SSIS package does.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Re:How to determine the long running jobs in a patch

    Hi ,
    How to determine the long running jobs in a patch .
    Regards

    Hi,
    Check the below MY ORACLE SUPPORT note:
    Note.252422.1 .... Check Completed Long Running Jobs In Oracle Apps.
    Best regards,
    Rafi

  • How can find out long run quries?

    Hi,
    I have some question
    how can find out long run queries , i have use v$session but i have not find out,pls how can find out
    these queries.

    v$session_longops has some limitations, for example it records only some operations see more [url http://www.gplivna.eu/papers/v$session_longops.htm]here
    Another possibility might be using statspack and/or [url http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14211/autostat.htm#PFGRF02601]AWR
    From docs:
    The most current instructions and information on installing and using the Statspack package are contained in the spdoc.txt file installed with your database. Refer to that file for Statspack information. On Unix systems, the file is located in the ORACLE_HOME/rdbms/admin directory. On Windows systems, the file is located in the ORACLE_HOME\rdbms\admin directory.
    Gints Plivna
    http://www.gplivna.eu

  • How to start and stop the BI Services in Solaris 10

    Hello All,
    Can anyone guide me on how to start and stop the BI Services in Solaris 10. In windows there are options set in Start->Programs->Middleware_Home->Start/Stop BI Services.
    Primarily after doing changes to the scheduler configuration, I need to restart the services to get it implemented? If yes how can I do it?
    Any help will be appreciated
    Thank you
    Ash
    Edited by: 902739 on Jan 11, 2012 12:17 PM

    Please help me by showing action plan for stop sap , offline backup and then start sap.
    i am little bit confuse How to start and stop SAP on cluster for offline backup
    Below are the systems name with host name , please explain me in sequence
    Systems name                                   Hostname
    # Hope SAP ERP Prod DB Primary       gsgbbux860
    # Hope SAP ERP Prod DB Standby      gsgbbux861
    # Hope SAP ERP Prod Cluster              gsgbbux862
    # Hope SAP ERP App 1                       gsgbbux864
    # Hope SAP ERP App 2                       gsgbbux865
    Thanks in advance
    Zaheer

  • How do I use the commands to start and restart the jmqbroker normally?

    How do I use the commands to start and restart the jmqbroker normally?
    Because I have tried to use "jmqcmd shutdown bkr" and then tried to type
    "jmqbroker" to start up. My screen hangs up and seems that the process
    hangs up. The message is
    [28/Jun/2002:18:29:07 GMT+08:00] [B1060]: Loading persistent data...
    [28/Jun/2002:18:29:08 GMT+08:00] [B1039]: Broker "jmqbroker" ready.
    The prompt is hanged until I press CTRL-C.
    Then I got the following message:
    [28/Jun/2002:18:32:07 GMT+08:00] [B1047]: Shutting down broker...
    [28/Jun/2002:18:32:07 GMT+08:00] [B1077]: Broadcast good-bye to all
    connections ....
    [28/Jun/2002:18:32:07 GMT+08:00] [B1078] Flushing good-bye messages
    [28/Jun/2002:18:32:07 GMT+08:00] [B1056] Cleaning up persistent
    store...
    [28/Jun/2002:18:32:07 GMT+08:00] proceessing 0 messages and cleaning
    up 0 files...
    [28/Jun/2002:18:32:07 GMT+08:00] [B1063] Done
    [28/Jun/2002:18:32:07 GMT+08:00] [B1048]: Shutdown of broker complete.
    Then, I use jmqadmin to invoke the console, I can start the broker
    again, it gives me
    Error encountered while connecting to the broker: "MyBroker":
    Broker Host: 'localhost'
    Primary Port: '7676'
    [C4003]: Error occurred on connection creation, - caught
    javax.jms.JMSException
    Please verify that there is a broker running on the specified host and
    port.
    I used ps -def | grep jmq there is no process anymore.
    Is it a bug? Would somebody have any idea on what went wrong?

    'jmqbroker' is the command to start a broker.
    When you type 'jmqbroker' in a command window,
    unless you put it in the background, the shell
    prompt won't return until the broker is shutdown.
    So when you see 'Broker "jmqbroker" ready.', it tells
    you that the broker is running and is ready.
    When you CTRL-C the process, it has the same effect
    as using jmqcmd to shutdown the broker. And so after that,
    there's no jmq processes running since you have just
    shutdown the broker.
    Remember that the jmqcmd/jmqadmin 'restart' command is to
    restart an already running broker. jmcmd/jmqadmin does
    not support starting a new broker instance.
    If you are using csh, end the jmqcmd command with an ampersand ("&")
    to have the broker running in the background. An alternative is to
    stop the process with Ctrl-Z then input the command "bg" to have that
    process resumed in the background.
    The problem with not being able to start a broker using the
    administration console is a documented limitation of the product that
    Yvonne also mentioned. Check the Administrator's Guide for that.

  • How to Start and Stop Processes?

    How to Start and Stop Processes?
    Im trying to create a program which allows me to Start and Stop (and Restart) GameServers. I will then expand on this so i can start and stop them through a web applet with build in useraccounts.
    Currently the way we do this is to log into the server using a RemoteAssistance. Which is not very safe as the users have the abbility to do anything on the server and potentially corrupt it.
    Below is my code for how i start the servers. But i dont know how i would stop the process.
                    private void startServers()
                   for(GameServer gs : servers)
                        int ID = Integer.parseInt(gs.getID());
                        if(isChecked(ID))
                             try
                                  String cmd[] = gs.getStartString();
                                  Runtime.getRuntime().exec(cmd);
                                  int sleepPeriod = Integer.parseInt(sleepField.getText());
                                  Thread.sleep(sleepPeriod*100);     
                             catch(Exception e)
                             System.out.println(e);
                   }//end of iterator
                   JOptionPane.showMessageDialog(null,"All Selected Servers Have been started.","Servers Started",2);     
         }//end of startserversAnyhelp would be great thanks.

    Using the process class would give you a nicer API, but using destroy isn't a nice way to shutdown a process. Its like killing the process with your task manager. You should make a connection in some way with the game server and tell it to shutdown in stead (gracefull termination).

  • How to start and stop Oracle Application Server from ANT

    How to start and stop Oracle Application Server and Web application from ANT
    Thanks in Advance.
    Mani

    Hi,
    You can use: startManagedWebLogic.sh, it is in your domain directory and you have to execute it in this way
    ./startManagedWebLogic.sh managedServerName http://adminServerHost:adminServerPort
    For instance, in my case I use:
    unixserv01:/webportal/domains/appServerWeb/bin>startManagedWebLogic.sh managedServ01 http://pelma3w3per01.mesaperu.next:7001
    You have to run it on the machine where the managed server was installed.
    Best regards,
    Raúl

  • How to start and finish a transaction using EJB 3.0 in JDeveloper

    Hello everybody!
    Does anybody can explain how to start and finish a transaction using EJB 3.0. I need to start a transaction insert some information in some tables and if everything was fine commit the information.
    I put the annotation @TransactionManagement(TransactionManagementType.BEAN) in my session bean and @Resource SessionContext ejbContext; but I don't what anything else I have to do.
    Any help will be appreciate.

    I tryied to use in the client the statement EntityTransaction transaction = myBean.getTransact(); but I receive the EJBException: Cannot use resource level transactions with a container managed EntityManager
    I just need to start a transaction something like this: transaction.begin(); and finish the transaction, something like this: transaction.commit();
    Does anybody can help?

  • How to start and stop a queue in ECC??

    Dear all,
    I have a problem regarding the Start and Stop of queues in ECC. Whenever I change the data in ECC (for example extension of a material to a new distribution chain, or Creating a quotation which has to trigger a corresponding quotation in CRM), replication is not happening to CRM. On analysis of the outbound queue in ECC, we are finding corresponding ernties for the material / quotation. On dbl cliking an entry, we are able to see the queue in STOP status. When tried to reset status and activate, system throws a message saying GENERIC STOP SET.
    1) How to overcome this problem?
    2) How to START or STOP a queue (for Eg: R3AD*) in ECC? 
    Please respond.
    Every point you share will fetch so many points / lot many smiles to you (No surprises.. I am plagerizing the famous quote on SDN)
    Regards,
    Rajesh

    Dear Chandra,
    Thanks for ur quick response. I have awarded you a sixer. Ofcourse, the content is much richer than that. But if i award 10, thread has to be closed. So that stopped me from awarding that
    Dear all,
    Can someone else share their views?
    Regards,
    Rajesh

  • How to Start and Stop the SAP System

    Hi,
    I have installed "Sneak Preview"; Searched for start and stop scripts but there are more than one script which has named start.bat and stop.bat. Moreover, I searched the documents which comes with Sneak Preview but could find useful instruction there either.
    Question: Could you please point me to the documentation where it explains the starting and stopping SAP, for Sneak Preview?
    Thanks in advance
    Jawad Kakar

    Please help me by showing action plan for stop sap , offline backup and then start sap.
    i am little bit confuse How to start and stop SAP on cluster for offline backup
    Below are the systems name with host name , please explain me in sequence
    Systems name                                   Hostname
    # Hope SAP ERP Prod DB Primary       gsgbbux860
    # Hope SAP ERP Prod DB Standby      gsgbbux861
    # Hope SAP ERP Prod Cluster              gsgbbux862
    # Hope SAP ERP App 1                       gsgbbux864
    # Hope SAP ERP App 2                       gsgbbux865
    Thanks in advance
    Zaheer

  • How to Starting and Stopping OC4J Server using Ant

    How to Starting and Stopping OC4J Server using Ant
    In the ant task definitions for ant-oracle-classes.jar (see antlib.xml) there are two tasks called
         name="restartServer" classname="oracle.ant.taskdefs.deploy.JSR88StartServer"
         name="shutdownServer" classname="oracle.ant.taskdefs.deploy.JSR88ShutdownServer"
    I thought that these would shutdown and start the OC4J server. I guessed the parameters as – (Does anyone know where 50 ant targets are documented?)
    <oracle:restartServer
    userid="${oc4j.admin.user}"
         password="${oc4j.admin.password}"
         deployeruri="${deployer.uri}"
    />
    <oracle:shutdownServer
         userid="${oc4j.admin.user}"
         password="${oc4j.admin.password}"
         deployeruri="${deployer.uri}"
    />
    This, however does not start and stop the SOA suite. To do that I've hacked this solution together -
    <path id="oc4j.console">
         <pathelement location="${oracle.home}/config"/>
         <pathelement location="${oracle.home}/jlib/startupconsole.jar"/>
         <pathelement location="${oracle.home}/opmn/lib/optic.jar"/>
         <pathelement location="${oracle.home}/lib/xmlparserv2.jar"/>
    </path>
    <target name="stop" description="stop oc4j server" depends="init">
         <java classname="oracle.appserver.startupconsole.view.Runner">
              <classpath refid="oc4j.console"/>
              <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
              <arg value="stop"/>
         </java>
    </target>
    <target name="start" description="restart oc4j server" depends="init">
         <java classname="oracle.appserver.startupconsole.view.Runner">
              <classpath refid="oc4j.console"/>
              <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
              <arg value="start"/>
         </java>
    </target>
    This sort of works – except when the SOA suite doesn't stop cleanly – and needs user interaction to press a Close button. This isn't very useful when doing a continous integration build and deploy.
    So, does anyone have any suggestions or alternative methods to do this?
    - frank

    Actually if the server throws exceptions when it stops (which it always has since we applied patch 10.1.3.3) this technique will pause until a user responds to pop-up ... So a better way (I think) is -
    <target name="start" description="start oc4j server" depends="init">
    <java classname="oracle.appserver.startupconsole.view.Runner">
    <classpath refid="oc4j.console"/>
    <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
    <arg value="start"/>
    </java>
    </target>
    <target name="stop" description="stop oc4j server" depends="init">
    <echo message="We expect OC4J *NOT* to stop cleanly, so we will timeout after 3 minutes ..."/>
    <java classname="oracle.appserver.startupconsole.view.Runner" fork="true" timeout="180000">
    <classpath refid="oc4j.console"/>
    <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
    <arg value="stop"/>
    </java>
    </target>
    <target name="restart" description="restart oc4j server">
    <antcall target="stop"/>
    <!-- wait for server to quieten down -->
    <waitfor maxwait="2" maxwaitunit="minute">
    <not><http url="http://${oc4j.http.hostname}:${oc4j.http.port}"/></not>
    </waitfor>
    <antcall target="start"/>
    </target>

  • How to start and stop VIO cluster

    How to start and stop VIO cluster
    How to extend/modify the VIO cluster once created from webclient
    Thanks,
    Venkat

    VIO 1.0 GA version has the UI to start/stop the cluster

Maybe you are looking for