diff --git a/weekly_routine.sh b/weekly_routine.sh
index ccd1ba67feee26d6ab8ff71aeedf04e386724527..502ee1eff2a38623930a99a0b0b52baa56b0697d 100755
--- a/weekly_routine.sh
+++ b/weekly_routine.sh
@@ -201,9 +201,6 @@ if [[ -z "${DBNAME}" ]]; then
     exit 1
 fi
 
-# If DBNAME hasn't changed then restart canto and quit
-check_if_canto_restart_required
-
 # Transform $DBNAME 
 CANTO_CONFIG="./canto/canto_deploy.yaml"
 log "Inserting ${DBNAME} into ${CANTO_CONFIG}"
@@ -245,7 +242,8 @@ if [[ "${DATACHANGED}" == "YES" ]]; then
     ./canto/script/canto_docker ./script/canto_load.pl --process-extension-config --ontology  /import_export/FBbt-GO.obo --ontology    /import_export/fly_development.obo --ontology   /import_export/flybase_controlled_vocabulary.obo
 fi
 
-
+# If DBNAME hasn't changed then restart canto and quit
+check_if_canto_restart_required
 
 # data import (using Gillian's scripts in the vm - see point 7.d in https://docs.google.com/document/d/19C-J8sJmZb_OSluxyzBWJxUkdR_N4sIpgjHI7u5pp0I/edit)
 # GM comment: the following 'if' command should work