-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Accepted 🌱 受理Maintainer may be busy resolving or fixing the labeled issuesMaintainer may be busy resolving or fixing the labeled issuesDelayed ⌛ 延期Issues have been accepted but won't be settled in timeIssues have been accepted but won't be settled in timeFeedback Awaited 🕒 等待反馈Waiting for the feedback from issue creater and issue will be closed if duration is over one monthWaiting for the feedback from issue creater and issue will be closed if duration is over one monthProposal 💡 方案Issue creater's own proposal which may be really helpfulIssue creater's own proposal which may be really helpfulReinforcement ✨ 强化Issues for higher quality of being compatibleIssues for higher quality of being compatible
Description
我发现,当jvm内存占用过高时,autojs6会奔溃。
于是我打算写一个逻辑在代码里:监控jvm内存,当内存快满的时候,重启autojs6,达到释放内存的目的,然后重新执行脚本。
我发现,通过定时任务,广播设置:autojs6启动时,能够达到启动执行脚本的目的。
but,重启要点击autojs6左上角菜单展开的下方“重启”按钮才行。
我自己写的重启代码,成功重启autojs6,但无法触发定时任务“启动时”。
如果通过无障碍服务布局分析,一步步打开菜单去点击“重启”按钮,貌似也可以,但属于最差方案。
方案一:脚本通过命令执行重启和执行脚本,全程无感。
方案二:无感重启+autojs6定时任务“启动时”配合。
方案三:布局分析点击“重启”按钮+autojs6定时任务“启动时”配合。
现在只能做到方案三。
方案二也难以实现,不知道我的重启代码问题在哪儿。
方案一也搞不定
Metadata
Metadata
Assignees
Labels
Accepted 🌱 受理Maintainer may be busy resolving or fixing the labeled issuesMaintainer may be busy resolving or fixing the labeled issuesDelayed ⌛ 延期Issues have been accepted but won't be settled in timeIssues have been accepted but won't be settled in timeFeedback Awaited 🕒 等待反馈Waiting for the feedback from issue creater and issue will be closed if duration is over one monthWaiting for the feedback from issue creater and issue will be closed if duration is over one monthProposal 💡 方案Issue creater's own proposal which may be really helpfulIssue creater's own proposal which may be really helpfulReinforcement ✨ 强化Issues for higher quality of being compatibleIssues for higher quality of being compatible