task skeduled doesn't work

Hi folks, I’ve just started to use SuiteCRM. I want to create a scheduled task to import data from csv. But first i tryed to do something easyer. I followed the guide, so i create the import_data.php

$job_strings[] = 'importData';

function importData(){
	$fp = fopen("data.txt", "r+");
	fwrite($fp, "ciao a tutti");
   return true;

then i created en_us.import_data.php


$mod_strings['LBL_IMPORTDATA'] = 'Nice name to be displayed in admin';

So after that i go on my site, i made a repair and rebuild and i create the thask. I set the execution every 1 min. But when i go to check the status is: Last execution without error: never.

I whent in suitecrm.log but nothing shows. I checked the data.txt and it’s blank. I don’t get what i’m doing wrong. Any suggestiony?
Ty for all

There are a few things you can try

  • check php_errors.log there should be a reason there for the failure

  • add logging to you own job, to write messages to suitecrm.log as it begins, so you can make sure it’s running

  • check job_queue in the database

1 Like

thank you very much. now it works!