In Miva 9.6 there is a new function called "Scheduled Tasks." From here you can schedule various tasks to run automatically in your store. Here's how it works:
Click on "Menu," scroll down to "Store Settings," click on the "Scheduled Tasks" tab. There is a default setting that comes with every 9.6 update and that's "Delete Expired Shopping Baskets." This new scheduled task will remove any items left in abandoned shopping carts once a day for you automatically.
Click the "+" icon
A pop up window will appear. In this example we are going to run our Google Feed which we already set up earlier. If you'd like to see how to set one up for your store, [click here](http://docs.miva.com/v1.0/docs/how-to-create-a-google-sitemap-through-feeds).
Run Google Feed (or whatever feed you choose)
Choose your task - we chose Standard Scheduled Tasks: Run a Feed
You have three options in the drop down menu.
For this example, we chose to run our Google Feed once every 7 Days.
You can choose when you want to begin the run by changing the date/time.
Ours is blank now but once it starts running it will show you when the last run took place.
To choose our Google Feed we need to click on the "Look Up" button.
Click on the Feed you want to run, for this example, "Google_Sitemap." Click ok.
Once all your settings are filled out correctly, click the "Save" button.
You will now see that you have a new Scheduled Task set up and ready to run.
There are two configurable setting for scheduled tasks located under Store Settings -> Settings
This setting allows you to have Miva create a background thread which will sit and wait in the background until the task is set to run. By default this value is 0 seconds, which means this thread won’t be created until the task is ready to run. If you have a low traffic store or want to ensure your task will always run at the exact right time, you can adjust this value from 0 up to 864000 (24 hours). For example if you have this value set for 3600 (60 minutes) and a scheduled task is set to run in 58 minutes from now, Miva will start a background thread that will sit and wait until the time your task is set to run and execute the task and exit.
At most 1 background thread can be running at a single time. Tasks will continue to be added to a queue and will be processed by their order in the queue.
ach Scheduled Tasks Process has a one hour default timeout, but it may be lower depending on specific store configuration. Scheduled Tasks should be written in a manner where they track their progress and are able to resume from where they are interrupted, to ensure they are compatible with any timeout setting, as well as any external factor that may cause them to end before completion.
The Recycle Schedule Tasks Setting allows you to recycle or “reset” the timeout of the background process before it reaches its timeout when you have multiple tasks running back to back. This value can be 0 to 3600 seconds. For example if you have 2 feeds that each take 45 minutes to run, when the first one completes the next one will run, but there will only be 15 minutes left on the timeout for the scheduled task thread. Changing this setting will allow the timeout to get reset between tasks.
By default this value is 60 minutes but it can be modified (reduced only) by an engine level setting. In Miva engines 5.24 or higher there is a new configuration parameter for:
This will allow you to change the timeout shorter than 60 minutes, if desired.