In wso2, VFS running default 5 minutes. I think this is bad for performance. I want VFS running when server is not busy. For example, maybe at 02:00 no body request, then VFS can work. I tried add scheduled task, but it no use. Anyone can tell me how to do this? Thank you very much.
I think your question is related to WSO2 How to set scheduled task? and https://stackoverflow.com/questions/10537190/how-to-vfs-service-exposed-as-a-web-service questions. Seems you want to do the VFS polling on a particular time of the day (scheduled to a non-peak time) or via a web service. But unfortunately I don't think it's possible to plug a CRON expression or a service call to VFS, because of how VFS transport has been implemented. Anyway you can suggest this as a feature request at WSO2 JIRA
What you are suggesting can lead to starvation. If the ESB server is continuously hit with requests, the VFS task will never run. As mentioned in the ESB documentation you can adjust the polling interval by specifying the transport.PollInterval parameter. An example of increasing the polling interval to 30 minutes can look like this in the ESB configuration:
<parameter name="transport.PollInterval">1800000</parameter>
来源:https://stackoverflow.com/questions/10585778/wso2-how-to-set-vfs-to-a-scheduled-task