diff --git a/src/frontend/src/components/ace-editor/default-script.js b/src/frontend/src/components/ace-editor/default-script.js index 6a19f12691..68198b0b4e 100644 --- a/src/frontend/src/components/ace-editor/default-script.js +++ b/src/frontend/src/components/ace-editor/default-script.js @@ -56,7 +56,7 @@ export default { 'function job_success', '{', ' local msg="$*"', - ' echo "$(job_get_now) job_success: [$msg]"', + ' echo "$(job_get_now) job_success:[$msg]"', ' exit 0', '}', '', @@ -64,7 +64,7 @@ export default { 'function job_fail', '{', ' local msg="$*"', - ' echo "$(job_get_now) job_fail: [$msg]"', + ' echo "$(job_get_now) job_fail:[$msg]"', ' exit 1', '}', '', diff --git a/src/frontend/src/views/cron-job/list/components/operation/index.vue b/src/frontend/src/views/cron-job/list/components/operation/index.vue index d5671d09c3..bc51123644 100644 --- a/src/frontend/src/views/cron-job/list/components/operation/index.vue +++ b/src/frontend/src/views/cron-job/list/components/operation/index.vue @@ -568,9 +568,9 @@ this.strategy = strategy; if (strategy === 'once') { this.$refs.timeTaskForm.clearError('cronExpression'); - this.formData.executeTime = generatorDefaultCronTime(); + this.formData.executeTime = this.formData.executeTime || generatorDefaultCronTime(); } else { - this.formData.cronExpression = '* * * * *'; + this.formData.cronExpression = this.formData.cronExpression || '* * * * *'; } this.formData.endTime = ''; this.formData.notifyChannel = [];