I have a directory which has multiple XML files and I am retrieving all XML files via glob function. It is working when I am using on submit button, but when i use it on cron job then it does not work and it can't be retrieve XML files.
$date = date('d');
$path = "../data/".$date;
$files = glob(MY_PLUGIN_DIR."/*.XML", GLOB_BRACE);
can you suggest me what should i do for it ?