Group membership

Activity

  • Flo replied on the discussion topic cron don't work
    every minute is only a test. In my script I try to save a file in elgg dataroot. If i try to save a txt file from the plugin, it's work.. but if i try to save a txt file from the script (every minute) it's not work.. Any idea?? Thanks for the... view reply
  • Flo replied on the discussion topic cron don't work
    Hi, thanks for the answer. I tested my code by hitting localhost/<path elgg>/cron/<interval> in a browser and it works, but I would like the function starts automatically every minute, and this does not occur. Any idea? view reply
  • Flo added a new discussion topic cron don't work in the group Plugin Development
    Hi, i'm a new user and i try to develop a plugin using cron. i read all web page on the argouments and i don't understand where should i put the contrab file. In the Elgg's package i found the contrab.example file but i don't kown the path where...
    • every minute?  That's really a lot.  Are you sure you need it that frequently?

    • that will result in utilizing huge server resources. As matt asked, are you sure that you need it every minute?

    • every minute is only a test. In my script I try to save a file in elgg dataroot. If i try to save a txt file from the plugin, it's work.. but if i try to save a txt file from the script (every minute) it's not work.. Any idea?? Thanks for the answer.

      This is my code(with elgg class):

       $arff_file_filestore = new ElggDiskFilestore( $CONFIG->dataroot . "/");
      $arff_file = new ElggFile();
      $arff_file->setFilename('prova.txt');
      $arff_file->setMimeType('text');

      $arff_file_filestore->open($arff_file,'write');
      $arff_file_filestore->write($CONFIG->dataroot . $arff_file_filestore->getFilenameOnFilestore($arff_file),'Hi');
      $arff_file_filestore->close();

      This is my code (without Elgg Class):

      function write_file_log($path,$text)
      {
          $var=fopen($path,"a+");
          fwrite($var, $text);
          fwrite($var, "\r\n");
          fclose($var);
      }

       

      write_file_log($CONFIG -> dataroot . "log.log", 'Try');

  • Flo joined the group Plugin Development

Friends

No friends yet.

Send private message

You must be logged in to send a private message.