ver Jan15thv3

scheduled closing?
This commit is contained in:
David Chang
2024-01-15 16:46:34 +08:00
parent 00922923ee
commit 4c87e11864

View File

@@ -0,0 +1,84 @@
{
"id": "37b9808f-b2b4-4177-ab00-9ddfae4bad27",
"snapshot": "thunderbird",
"instruction": "Please schedule thunderbird to turn off at 16:00",
"source": "https://www.quora.com/How-can-I-schedule-Mozilla-Thunderbird-to-turn-off-automatically",
"config": [
{
"type": "download",
"parameters": {
"files": [
{
"url": "https://drive.usercontent.google.com/download?id=1EHLRWzBCOsyERkSMUnTF2pnsR0n6ZvtR&export=download&authuser=0&confirm=t&uuid=de09bd5e-bef8-499a-b599-c642af190e10&at=APZUnTXqOsQkxl0zMSX6R1Sgp_v3:1704362491712",
"path": "/home/user/thunderbird-profile.tar.gz"
}
]
}
},
{
"type": "execute",
"parameters": {
"command": [
"tar",
"-xzv",
"--recursive-unlink",
"-f",
"/home/user/thunderbird-profile.tar.gz",
"-C",
"/home/user/"
]
}
},
{
"type": "launch",
"parameters": {
"command": [
"/usr/bin/thunderbird"
]
}
}
],
"evaluator": {
"postconfig": [
{
"type": "command",
"parameters": {
"command": ["timedatectl", "set-ntp", "off"]
}
},
{
"type": "command",
"parameters": {
"command": ["timedatectl", "set-time", "16:00"]
}
},
{
"type": "sleep",
"parameters": {
"seconds": 2.
}
},
{
"type": "execute",
"parameters": {
"command": "ps -eF |grep thunderbird",
"shell": true,
"stdout": "thunderbird.ps"
}
}
],
"func": "check_list",
"result": {
"type": "cache_file",
"path": "thunderbird.ps"
},
"expected": {
"type": "rule",
"rules": {
"unexpect": [
"/usr/lib/thunderbird/thunderbird"
]
}
}
}
}