A non-transitory computer readable medium storing a program causing a computer to execute a process comprising:
- controlling an operation of an apparatus by executing a control program, wherein in response to execution of the control program, a part of information regarding an operation of the information processing apparatus is initialized to initial value;
- during the operation of the information processing apparatus, setting the part of information to a first value different from the initial value;
- in a case where an instruction to shift to a power-off state is received, performing shift from a normal operation state to any one of a first power-off state or a second power-off state, the first power-off state being a state where the operation is stopped without restarting the control program, the second power-off state being a state where the control program is restarted and then the operation is stopped;
- and
- in a case where the shift to the first power-off state is made, setting the part of information regarding the operation of the information processing apparatus to a value that is set in a case where the control program is restarted.