summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2022-11-07 09:26:11 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2022-11-07 09:26:11 +0800
commitf9b584c029a88036df36088372aed1664a4a6c20 (patch)
tree02b9ad5f261a2c848b51645944cd7e14f45a97b9
parent4d2b4aa5a97cc8f640a7b934298c871dbaea18d2 (diff)
update_network_by_force.py: back up the edge file once a month.
-rw-r--r--Code/update_network_by_force.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Code/update_network_by_force.py b/Code/update_network_by_force.py
index 4d72463..252684c 100644
--- a/Code/update_network_by_force.py
+++ b/Code/update_network_by_force.py
@@ -150,7 +150,8 @@ if os.path.getmtime(MERGED_EDGE_FILE) < os.path.getmtime(EDGE_POOL_DIR): # edge
write_log_file('[update_network_by_force.py] Make html files for the web application.', UPDATE_NETWORK_LOG_FILE)
cmd = 'python3 html_network.py -f %s -r %s -c %s -n %s' % (MERGED_EDGE_FILE, PARAMETER_FOR_BUILDRMATRIX, PARAMETER_FOR_BUILDCMATRIX, PARAMETER_FOR_NET)
os.system(cmd)
- copy_and_backup_file(MERGED_EDGE_FILE, '../Analysis') # the backup file will be used for further analysis
+ if datetime.now().day % 28 == 0:
+ copy_and_backup_file(MERGED_EDGE_FILE, '../Analysis') # the backup file will be used for further analysis
# Compute overlap