diff --git a/src/plugins/job_submit/lua/job_submit_lua.c b/src/plugins/job_submit/lua/job_submit_lua.c
index b782d06b8b50bdff3cf0c48861de20c213b522ff..68e200c797a516eb66d12d7cda9ee166d67d8dea 100644
--- a/src/plugins/job_submit/lua/job_submit_lua.c
+++ b/src/plugins/job_submit/lua/job_submit_lua.c
@@ -1764,7 +1764,7 @@ static int _load_script(void)
 
 	if (L_orig)
 		lua_close(L_orig);
-	lua_script_last_loaded = time(NULL);
+	lua_script_last_loaded = st.st_mtime;
 	return SLURM_SUCCESS;
 }