StartTimer, StopTimer, OnTimer - any working example?


#1

As in subject, has anybody working example? :frowning:


#2

They are not working yet and will be removed in future update, because we have plans to offer a timer component in order to simulate CRON jobs.


#3

Great :slight_smile:
I have some important ideas about future of exeoutput, but need to profesionally describe you in swimlane diagrams.
First should be Hooks and Anchors Design Patterns - http://stevenblack.com/articles/hooks-and-anchors/
Finally when it is possible to use phpscripts to use in Hescript it should be very easy for you to define some hooks.
Before exeoutpt starts
After Body is ready
etc, etc


#4

Hi,
Look at this repository, it is for PHP, all you have to do is:

  1. allow user to select which script should be execute in the background every second, simple like allow to select which script is starting for application index.php, start.php etc :slight_smile:
  2. put this repository address in documentacion or in exeoutput gui https://goo.gl/MSQwUA , rest is in users hands :slight_smile:
    What do you think?

Or have you got any alternative in delphi?
http://www.appcontrols.com/manuals/cronjob/


#5

Thank you for your suggestions! We’ll have a look :slight_smile:


#6

Is there any current solution for adding cron jobs for a compiled app ?


#7

You can use AJAX to perform tasks in background for instance.


#8

I’m after something that can run without any user intervention.


#9

CRON job is a functionality we have on our TODO list, but it’s a bit risky to implement.


#10

Ok, thanks for the update.


#11

I’ve been trying to find a work around for this.

What I’ve tried is in a index.php have a link to a script to run in the background.
Start Cron

I added the following code, taken from http://php.net/manual/en/features.connection-handling.php#112843
to cron.php

ignore_user_abort(true);
set_time_limit(0);

$strURL = “index.php”;
header(“Location: $strURL”, true);
header(“Connection: close”, true);
header(“Content-Encoding: none\r\n”);
header(“Content-Length: 0”, true);

flush();
ob_flush();

session_write_close();

// Continue processing…

sleep(100);
exit;

This redirects straightaway when it’s not compiled in Exeoutput.

When it’s compiled it doesn’t redirect back to index.php until the script has finished.

I thought I had this working in Exeoutput but I must have been mistaken. Does the code need to be different for Exeoutput or is it not possible with Exeouput ?


#12

How far have you got with the module, I was looking at writting a windows powershell application ,have you had a look at the powershell module yet. Or are you writting it in python maybe ?


#13

These commands are ignored in ExeOutput.