mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-22 06:14:19 -07:00
fix cronjob not update after saved
This commit is contained in:
parent
b543c0c2f3
commit
4cbec9e63b
2 changed files with 23 additions and 2 deletions
|
@ -87,7 +87,21 @@ const EditMail = props => {
|
||||||
setState({ ...state, errorMessage, okMessage, loading: false });
|
setState({ ...state, errorMessage, okMessage, loading: false });
|
||||||
} else {
|
} else {
|
||||||
dispatch(refreshCounters()).then(() => {
|
dispatch(refreshCounters()).then(() => {
|
||||||
setState({ ...state, okMessage, errorMessage: '', loading: false });
|
setState({
|
||||||
|
...state,
|
||||||
|
generatedCronJob: {
|
||||||
|
...state.generatedCronJob,
|
||||||
|
h_min: result.data.min,
|
||||||
|
h_hour: result.data.hour,
|
||||||
|
h_day: result.data.day,
|
||||||
|
h_wday: result.data.wday,
|
||||||
|
h_month: result.data.month
|
||||||
|
},
|
||||||
|
data: result.data,
|
||||||
|
okMessage,
|
||||||
|
errorMessage: '',
|
||||||
|
loading: false
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,14 @@ if (!empty($_POST['save'])) {
|
||||||
check_return_code($return_var,$output);
|
check_return_code($return_var,$output);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
$v_cmd = $_POST['v_cmd'];
|
// Fetch updated cron
|
||||||
|
exec (VESTA_CMD."v-list-cron-job ".$user." ".$v_job." json", $output, $return_var);
|
||||||
|
check_return_code($return_var,$output);
|
||||||
|
|
||||||
|
$data = json_decode(implode('', $output), true);
|
||||||
|
unset($output);
|
||||||
|
|
||||||
|
$v_job = $_GET['job'];
|
||||||
|
|
||||||
// Set success message
|
// Set success message
|
||||||
if (empty($_SESSION['error_msg'])) {
|
if (empty($_SESSION['error_msg'])) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue