| Name | cronvice JSON |
| Version |
0.1.62
JSON |
| download |
| home_page | https://gitlab.com/ojr/cronvice |
| Summary | Automatically created environment for python package |
| upload_time | 2025-09-14 17:29:38 |
| maintainer | None |
| docs_url | None |
| author | me |
| requires_python | None |
| license | GPL2 |
| keywords |
|
| VCS |
|
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# cronvice
*maintain your programs running under SCREEN using AT job scheduler*
## Example
``` python
# example
cronvice --help
```
## Installation
``` {.bash org-language="sh"}
# you need the scheduler
# sudo apt install at # NOT HERE
sudo apt install crontab
# you nee the code (anti PEP 668 way)
pip3 install cronvice
```
All scripts must be in \~/.myservice/anyname/tag
- where \~/.myservice is the S-PATH, path to scripts structure
- anyname - can be number of different subfolders
- tag must be a executable script with a uniqe name in all
\~/.myservice
- \~/.config/cronvice/cfg.json - contains the S-PATH (\"services\")
- without a parameter, interactive tui is run, quit it with .q
## Usage
Harmless calls
``` example
cris l
cris t syncthing
cris p syncthing
cris c syncthing
```
Enter to screen enviroment when running
``` example
cris e syncthing
```
- r(un)
- a(dd)
- d(elete)
- e(nter)
- c(omment show)
- t(ime show)
- p(ath show)
- l(ist cron)
- x (block service call with impossible timestamp)
## Important services
### PI
- inet/ap~switch~
- inet/piaddr.py
- warning/lowdisk
- hwdevs/tele012~ntc~ (technic)
- image/flashcam8000
- image/flashcam5000
## BUGS
- crashes when no crontab defined
- DATE MUST BE \`Sat 12 Apr 17:09:55 CEST 2025\`
- NOT \`Sat Apr 12 15:09:39 UTC 2025\`
- use install.me script to repair
## Appendix
*these are comments for using uv and uvx.... this is new stuff*
### New workflow with environments
Workflow
- ./distcheck.sh (no pip3 inside)
- if `twine`{.verbatim} not present,
`uv tool install --force twine`
- same with `uv tool install --force bump2version`
- `uv tool install --upgrade cronvice` and if hidden errors:
- `uv tool install --upgrade cronvice==0.1.31` force to reveal
- NEVERTHELESS, environment is needed
- `make ~/.venv`
- `cd ~/.venv`
- `uv venv myservicenv` and it is in this user folder.
- ANY USE NEEDS `source ~/.venv/myservicenv/bin/activate`
- All stuff needs to be installed via uv: like
`uv pip install fire`
- When all is installed, `source ...activate` is run before python
call
- which works for `tele01` that calls `te01.py`
- that has normal shebang
- PROBLEM for `influx_chrony`
- no idea now...
- NO PROBLEM `telegrf`, only telegraf needs to get installed
**Using local venv is even better**
`uv venv` creates local .venv in the project, see more and more
about lock
### Hybrid shebang
*two cases with different environemnts are hard*
``` bash
#!/bin/bash
#myservice_description: disk and ntp to INFLUX
"""" 2>/dev/null
# BASH CODE STARTS HERE
echo "Hello world from Bash!"
sleep 1
if [ -e "$HOME/.venv/myservicenv/bin/activate" ]; then
source $HOME/.venv/myservicenv/bin/activate
echo i... myservicenev is activated
else
echo i... not activated
fi
sleep 2
# BASH CODE ENDS HERE
/usr/bin/env python3 $0
exit
"""
#Python code goes here
"""
...
PEP668 UV UVX.... I dont know how to use environment....
"""
import fire
import subprocess as sp
import socket
if __name__=="__main__":
fire.Fire( main )
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/ojr/cronvice",
"name": "cronvice",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "me",
"author_email": "ojr@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b7/a2/86a1857e3c66e76360e8714d9c5932f1bf23655cc66907a3eaf835cde961/cronvice-0.1.62.tar.gz",
"platform": null,
"description": "# cronvice\n\n*maintain your programs running under SCREEN using AT job scheduler*\n\n## Example\n\n``` python\n # example\ncronvice --help\n```\n\n## Installation\n\n``` {.bash org-language=\"sh\"}\n# you need the scheduler\n# sudo apt install at # NOT HERE\nsudo apt install crontab\n# you nee the code (anti PEP 668 way)\npip3 install cronvice\n```\n\nAll scripts must be in \\~/.myservice/anyname/tag\n\n- where \\~/.myservice is the S-PATH, path to scripts structure\n- anyname - can be number of different subfolders\n- tag must be a executable script with a uniqe name in all\n \\~/.myservice\n- \\~/.config/cronvice/cfg.json - contains the S-PATH (\\\"services\\\")\n- without a parameter, interactive tui is run, quit it with .q\n\n## Usage\n\nHarmless calls\n\n``` example\ncris l\ncris t syncthing\ncris p syncthing\ncris c syncthing\n```\n\nEnter to screen enviroment when running\n\n``` example\ncris e syncthing\n```\n\n- r(un)\n- a(dd)\n- d(elete)\n- e(nter)\n- c(omment show)\n- t(ime show)\n- p(ath show)\n- l(ist cron)\n- x (block service call with impossible timestamp)\n\n## Important services\n\n### PI\n\n- inet/ap~switch~\n- inet/piaddr.py\n- warning/lowdisk\n- hwdevs/tele012~ntc~ (technic)\n- image/flashcam8000\n- image/flashcam5000\n\n## BUGS\n\n- crashes when no crontab defined\n- DATE MUST BE \\`Sat 12 Apr 17:09:55 CEST 2025\\`\n - NOT \\`Sat Apr 12 15:09:39 UTC 2025\\`\n - use install.me script to repair\n\n## Appendix\n\n*these are comments for using uv and uvx.... this is new stuff*\n\n### New workflow with environments\n\nWorkflow\n\n- ./distcheck.sh (no pip3 inside)\n\n - if `twine`{.verbatim} not present,\n `uv tool install --force twine`\n - same with `uv tool install --force bump2version`\n\n- `uv tool install --upgrade cronvice` and if hidden errors:\n\n - `uv tool install --upgrade cronvice==0.1.31` force to reveal\n\n- NEVERTHELESS, environment is needed\n\n - `make ~/.venv`\n - `cd ~/.venv`\n - `uv venv myservicenv` and it is in this user folder.\n - ANY USE NEEDS `source ~/.venv/myservicenv/bin/activate`\n - All stuff needs to be installed via uv: like\n `uv pip install fire`\n - When all is installed, `source ...activate` is run before python\n call\n - which works for `tele01` that calls `te01.py`\n - that has normal shebang\n\n- PROBLEM for `influx_chrony`\n\n - no idea now...\n\n- NO PROBLEM `telegrf`, only telegraf needs to get installed\n\n **Using local venv is even better**\n\n `uv venv` creates local .venv in the project, see more and more\n about lock\n\n### Hybrid shebang\n\n*two cases with different environemnts are hard*\n\n``` bash\n#!/bin/bash\n#myservice_description: disk and ntp to INFLUX\n\n\"\"\"\" 2>/dev/null\n# BASH CODE STARTS HERE\n\necho \"Hello world from Bash!\"\nsleep 1\nif [ -e \"$HOME/.venv/myservicenv/bin/activate\" ]; then\n source $HOME/.venv/myservicenv/bin/activate\n echo i... myservicenev is activated\nelse\n echo i... not activated\nfi\nsleep 2\n# BASH CODE ENDS HERE\n/usr/bin/env python3 $0\nexit\n\"\"\"\n\n\n#Python code goes here\n\"\"\"\n...\nPEP668 UV UVX.... I dont know how to use environment....\n\"\"\"\nimport fire\nimport subprocess as sp\nimport socket\n\nif __name__==\"__main__\":\n fire.Fire( main )\n```\n",
"bugtrack_url": null,
"license": "GPL2",
"summary": "Automatically created environment for python package",
"version": "0.1.62",
"project_urls": {
"Homepage": "https://gitlab.com/ojr/cronvice"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b7a286a1857e3c66e76360e8714d9c5932f1bf23655cc66907a3eaf835cde961",
"md5": "1b7da315838fa8897d8e9978f404cea3",
"sha256": "2b40bbd5f0a79ba5a71aa3cf68626c462c04aba0fe1ffcc9895811238d7a6146"
},
"downloads": -1,
"filename": "cronvice-0.1.62.tar.gz",
"has_sig": false,
"md5_digest": "1b7da315838fa8897d8e9978f404cea3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 41050,
"upload_time": "2025-09-14T17:29:38",
"upload_time_iso_8601": "2025-09-14T17:29:38.654242Z",
"url": "https://files.pythonhosted.org/packages/b7/a2/86a1857e3c66e76360e8714d9c5932f1bf23655cc66907a3eaf835cde961/cronvice-0.1.62.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-14 17:29:38",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "ojr",
"gitlab_project": "cronvice",
"lcname": "cronvice"
}