diff --git a/reflex/utils/build.py b/reflex/utils/build.py index f16224d059..7708090150 100644 --- a/reflex/utils/build.py +++ b/reflex/utils/build.py @@ -237,6 +237,9 @@ def setup_frontend( # Set the environment variables in client (env.json). set_env_json() + # update the last reflex run time. + prerequisites.set_last_reflex_run_time() + # Disable the Next telemetry. if disable_telemetry: processes.new_process( diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 0e49e3b559..3c2875204b 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -131,6 +131,14 @@ def get_or_set_last_reflex_version_check_datetime(): return last_version_check_datetime +def set_last_reflex_run_time(): + """Set the last Reflex run time.""" + path_ops.update_json_file( + get_web_dir() / constants.Reflex.JSON, + {"last_reflex_run_datetime": str(datetime.now())}, + ) + + def check_node_version() -> bool: """Check the version of Node.js.