Reputation: 337
I need to run a VFS Transport at a specific time of the day, so to me the obvious solution seems to be calling it from a CRON-style Scheduled Task.
According to my internet searches this seems to be possible but as I'm quite new to WSO2 ESB haven't found a way to get this done yet.
Is this really possible?
If so, can you please point me in the right direction?
Upvotes: 3
Views: 438
Reputation: 5946
A solution would be to write your own task / class / javascript / mediatior
You should have a look at https://docs.wso2.org/display/ESB481/Writing+Tasks+Sample : This custom task sample cover something similar to your needs
An other sample based on a javascript that look if a file exist :
<script language="js">
importPackage(Packages.org.apache.commons.vfs2);
if(VFS.getManager().resolveFile("smb://DOMAIN\\user:password@hostname/dir/myfile.xml").exists()){
mc.setProperty("THIS_FILE_EXIST","true")
} else {
mc.setProperty("THIS_FILE_EXIST","false")
}
</script>
Upvotes: 1
Reputation: 9692
VFS transport does not support cron expressions..You can define polling interval in seconds
Upvotes: 0