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

Cannot show status and it does not schedule either #12

Closed
hainingpan opened this issue Dec 27, 2020 · 0 comments
Closed

Cannot show status and it does not schedule either #12

hainingpan opened this issue Dec 27, 2020 · 0 comments

Comments

@hainingpan
Copy link

Describe the bug
I followed the readme, but did not succeed.
To Reproduce
Create a foo.py

import datetime
import time

stamp = datetime.datetime.now().strftime("%H:%M:%S")
time.sleep(5)

print(f"Foo - {stamp} + 5 seconds")

Then schedule with hickory schedule foo.py --every=10s

Then check the status using hickory status

Expected behavior
Expect the schedule will work and the show the status of all scheduled jobs

Environment:

  • OS: [Linux] (Windows subsystem linux 2)
  • Version: [Ubuntu 20.04.1 LTS]

Additional context
When I check status, it shows

Traceback (most recent call last):
  File "/home/jake/anaconda3/bin/hickory", line 8, in <module>
    sys.exit(main())
  File "/home/jake/anaconda3/lib/python3.8/site-packages/hickory/cli.py", line 86, in main
    return status()
  File "/home/jake/anaconda3/lib/python3.8/site-packages/hickory/cli.py", line 71, in status
    return status_systemd()
  File "/home/jake/anaconda3/lib/python3.8/site-packages/hickory/systemd.py", line 126, in status_systemd
    info_dicts = [_service_info(s) for s in services]
  File "/home/jake/anaconda3/lib/python3.8/site-packages/hickory/systemd.py", line 126, in <listcomp>
    info_dicts = [_service_info(s) for s in services]
  File "/home/jake/anaconda3/lib/python3.8/site-packages/hickory/systemd.py", line 118, in _service_info
    state = _find_state(short)
  File "/home/jake/anaconda3/lib/python3.8/site-packages/hickory/systemd.py", line 105, in _find_state
    state = re.findall("Active: (.*?)\n", status)[0]
IndexError: list index out of range
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

1 participant