diff --git a/rigpl_erpnext/hooks.py b/rigpl_erpnext/hooks.py index 852867de..2320644e 100755 --- a/rigpl_erpnext/hooks.py +++ b/rigpl_erpnext/hooks.py @@ -190,11 +190,16 @@ scheduler_events = { "cron": { - "45 * * * *": [ + "10 2 * * *": [ "rigpl_erpnext.rigpl_erpnext.scheduled_tasks.variant_copy.check_wrong_variants" + #Runs everyday at 2:10 AM ], "*/16 * * * *":[ "rigpl_erpnext.rigpl_erpnext.scheduled_tasks.indiamart.execute" + ], + "10 3 * * *": [ + "rigpl_erpnext.rigpl_erpnext.scheduled_tasks.item_valuation_rate.set_valuation_rate_for_all" + #Runs everyday at 3:10 AM ] }, "all": [ @@ -202,8 +207,7 @@ ], "daily": [ "rigpl_erpnext.rigpl_erpnext.scheduled_tasks.permission_check.check_permission_exist", - "rigpl_erpnext.rigpl_erpnext.scheduled_tasks.work_order_status.execute", - "rigpl_erpnext.rigpl_erpnext.scheduled_tasks.item_valuation_rate.set_valuation_rate_for_all" + "rigpl_erpnext.rigpl_erpnext.scheduled_tasks.work_order_status.execute" ], "hourly": [ diff --git a/rigpl_erpnext/rigpl_erpnext/scheduled_tasks/variant_copy.py b/rigpl_erpnext/rigpl_erpnext/scheduled_tasks/variant_copy.py index b132a818..672beb58 100644 --- a/rigpl_erpnext/rigpl_erpnext/scheduled_tasks/variant_copy.py +++ b/rigpl_erpnext/rigpl_erpnext/scheduled_tasks/variant_copy.py @@ -37,7 +37,7 @@ def check_items_last_modified(): validate_variants(it_doc, comm_type="backend") check += check_and_copy_attributes_to_variant(temp_doc, it_doc) - if sno%30 == 0: + if sno%100 == 0: frappe.db.commit() def copy_from_template():