Addition to job schedule

Post your support requests/solutions for phpJobScheduler [website]
ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

Addition to job schedule

Postby ijyoung » Wed Oct 29, 2008 6:01 pm

I want to be able to add a specific date to the job schedule and have added an extra field to the Jobscheduler table and extra code to phpjobscheduler.php page.

The script runs great and updates the table as expected - problem is page that I want to fire doesn't run.

Page itself runs if fired manually.

Any thoughts?

Ian

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Wed Oct 29, 2008 6:47 pm

Hi Ian,

Are you using the full url?
Or implicit url?

And does it run OK when added as a normal job?

Let me know...

Dave

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Wed Oct 29, 2008 6:50 pm

FYI
A similar type of thing is on the list to be added when I get round to it:

    add a one-off job run - to run once at a specified date

ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

Postby ijyoung » Wed Oct 29, 2008 7:32 pm

davidgwalker wrote:Hi Ian,

Are you using the full url?
Or implicit url?


Full URL
And does it run OK when added as a normal job?


Yes. All tested before I started working on new addition.

Should have mentioned that in logs there is no output.

Ian

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Wed Oct 29, 2008 7:48 pm

Sounds like you have checked the most obvious things.

All I can say is wait until the next release when similar functionality will be added.

Or debug your code line by line.

ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

Postby ijyoung » Wed Oct 29, 2008 9:27 pm

Ok Back to drawing board.

The script itself has just fired itself. So part is working ok.

Cheers

ian

ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

Postby ijyoung » Thu Oct 30, 2008 8:04 am

Found the problem, Dave. The scripts to fire were sitting on a Windows server. When moved to Linux they fired. Funny thing is - phpscheduler is sitting in the Windows server and everything fires manually.

I can now move on the final part of jigsaw.

Now if only.....

Cheers

Ian

ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

A solution

Postby ijyoung » Thu Oct 30, 2008 11:10 am

Following additions to the code allow the setting of the start date.

in add-modify.html
add extra input field <tr>
<td>Start Date</td><td><input class="box" name ="start" ></td>
</tr>
I have put this after the "name" input field.

In the add-modify.php we need the following:

$start=clean_input($_POST['start']);
$start = str_replace('/','-', $start);
$dat = date('Y-m-d', strtotime("$start"));
$startdate=strtotime("$dat");

This takes the date input, cleans it up replaces any slashes and converts to seconds.

The start date is then midnight of the day in question.
The time interval is set in usual manner.

So far it seems to work for both US and UK format of writing dates.

Hoep this is useful

Cheers

Ian


Return to “phpJobScheduler [forum]”

Who is online

Users browsing this forum: No registered users and 1 guest