Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
8
  • Can you post the output of sudo systemctl status myservice? I tried this and it worked flawlessly using my home dir. Did you run sudo systemctl daemon-reload after adding the service file to /lib/systemd/system? Also, what makes you think the service works? Commented Mar 11, 2017 at 14:12
  • output is: systemctl status myscript.service くろまる myscript.service - My Script Service Loaded: loaded (/lib/systemd/system/myscript.service; disabled; vendor preset: enabled) Active: active (running) since Cts 2017年03月11日 21:54:59 +03; 2min 7s ago Main PID: 16614 (python) CGroup: /system.slice/myscript.service └─16614 /usr/bin/python /home/pala/PycharmProjects/myScript.py Mar 11 21:54:59 palaPC systemd[1]: Started My Script Service. Commented Mar 11, 2017 at 18:59
  • Service works there is no any problem as you see above, but my script has to create and write file.txt every 2 seconds. The problem is: file isnt created by the service Commented Mar 11, 2017 at 19:03
  • I had written "sudo systemctl daemon-reload" but it hadn't worked. After I reload the computer, services worked and created the file.Thanks for everything. Commented Mar 11, 2017 at 19:15
  • Did you at all run sudo system systemctl start after creating the service file? Commented Mar 12, 2017 at 18:28

lang-py

AltStyle によって変換されたページ (->オリジナル) /