I created webform and saving submitted data into text file in drupal files folder. A remote script performs calculations and outputs new text file to the same folder . I want cron to run everytime text file is generated, so that i can print result from text file to webform and also save them to database
So far i created custom module for webform and used hook_cron() as shown below
function simulation_ignition_view_cron()
{
$uri = 'default/files/simulation/generatedfile.txt';
if (file_exists($uri)) {
drupal_set_message("hello cron");
}
}
Please let me know if my explanation is not clear and please give some suggestions