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
Addition to job schedule
-
- 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:
-
- 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:
-
- 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:
A solution
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
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