From c14390cf4100fe24689ed535f34b05273d4dcfea Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 7 Jun 2026 13:56:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20work=5Fdir=20=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/validation/schedule.ts | 1 + src/locales/en-US.json | 3 +++ src/locales/zh-CN.json | 3 +++ 3 files changed, 7 insertions(+) diff --git a/back/validation/schedule.ts b/back/validation/schedule.ts index cc605152..d5ba6a54 100644 --- a/back/validation/schedule.ts +++ b/back/validation/schedule.ts @@ -82,4 +82,5 @@ export const commonCronSchema = { 'string.unsafePath': '绝对路径必须在日志目录内或使用 /dev/null', }), allow_multiple_instances: Joi.number().optional().valid(0, 1).allow(null), + work_dir: Joi.string().optional().allow('').allow(null), }; diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 27a3306a..b570244f 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -491,6 +491,9 @@ "请输入运行任务前要执行的命令,不能包含 task 命令": "Please enter the command to run before executing the task, cannot contain task commands", "请输入运行任务后要执行的命令,不能包含 task 命令": "Please enter the command to run after executing the task, cannot contain task commands", "不能包含 task 命令": "Cannot contain task commands", + "工作目录": "Working Directory", + "脚本执行时的工作目录,留空则自动检测。相对路径基于 scripts 目录,也支持绝对路径": "Working directory for script execution. Leave blank for auto-detection. Relative paths are based on the scripts directory. Absolute paths are also supported.", + "留空自动检测,或输入相对/绝对路径": "Leave blank to auto-detect, or enter a relative/absolute path", "Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/": "Connection address of the Chronocat Red service https://chronocat.vercel.app/install/docker/official/", "个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx": "Individuals: user_id=individual QQ Groups fill in group_id=QQ Groups more than one with English; separated by the same time to support individuals and groups such as: user_id=xxx;group_id=xxxx;group_id=xxxxx", "docker安装在持久化config目录下的chronocat.yml文件可找到": "The docker installation can be found in the persistence config directory in the chronocat.yml file", diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index 2462c147..7ac4daa8 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -491,6 +491,9 @@ "请输入运行任务前要执行的命令,不能包含 task 命令": "请输入运行任务前要执行的命令,不能包含 task 命令", "请输入运行任务后要执行的命令,不能包含 task 命令": "请输入运行任务后要执行的命令,不能包含 task 命令", "不能包含 task 命令": "不能包含 task 命令", + "工作目录": "工作目录", + "脚本执行时的工作目录,留空则自动检测。相对路径基于 scripts 目录,也支持绝对路径": "脚本执行时的工作目录,留空则自动检测。相对路径基于 scripts 目录,也支持绝对路径", + "留空自动检测,或输入相对/绝对路径": "留空自动检测,或输入相对/绝对路径", "Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/": "Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/", "个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx": "个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx", "docker安装在持久化config目录下的chronocat.yml文件可找到": "docker安装在持久化config目录下的chronocat.yml文件可找到",