aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cron/cron.inc31
-rw-r--r--config/cron/cron.php240
-rw-r--r--config/cron/cron.xml74
-rw-r--r--config/cron/cron_edit.php339
-rw-r--r--pkg_config.10.xml2
5 files changed, 338 insertions, 348 deletions
diff --git a/config/cron/cron.inc b/config/cron/cron.inc
index a457f013..0c7c6769 100644
--- a/config/cron/cron.inc
+++ b/config/cron/cron.inc
@@ -3,10 +3,10 @@
/*
/* ========================================================================== */
/*
- cron.inc
- Copyright (C) 2008 Mark J Crane
- All rights reserved.
- */
+ cron.inc
+ Copyright (C) 2008 Mark J Crane
+ All rights reserved.
+ */
/* ========================================================================== */
/*
Redistribution and use in source and binary forms, with or without
@@ -33,35 +33,31 @@
require_once("services.inc");
-function cron_pkg_is_service_running($servicename)
-{
+function cron_pkg_is_service_running($servicename) {
exec("/bin/ps ax | awk '{ print $5 }'", $psout);
array_shift($psout);
- foreach($psout as $line) {
+ foreach ($psout as $line) {
$ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line)))));
}
- if(is_service_running($servicename, $ps) or is_process_running($servicename) ) {
+ if (is_service_running($servicename, $ps) or is_process_running($servicename)) {
return true;
- }
- else {
+ } else {
return false;
}
}
-function cron_sync_package()
-{
+function cron_sync_package() {
- global $config;
+ global $config;
//synch cron tab
configure_cron();
exec("/usr/local/etc/rc.d/cron.sh stop");
exec("/usr/local/etc/rc.d/cron.sh start");
}
-
-function cron_install_command()
-{
+
+function cron_install_command() {
global $config;
conf_mount_rw();
@@ -88,8 +84,7 @@ function cron_install_command()
}
-function cron_deinstall_command()
-{
+function cron_deinstall_command() {
conf_mount_rw();
exec("/usr/local/etc/rc.d/cron.sh stop");
unlink_if_exists("/usr/local/etc/rc.d/cron.sh");
diff --git a/config/cron/cron.php b/config/cron/cron.php
index b9666e01..d7ed1494 100644
--- a/config/cron/cron.php
+++ b/config/cron/cron.php
@@ -30,21 +30,21 @@
require_once("guiconfig.inc");
require_once("/usr/local/pkg/cron.inc");
-$a_cron = &$config['cron']['item'];
+$a_cron = &$config['cron']['item'];
if ($_GET['act'] == "del") {
- if ($_GET['type'] == 'php') {
- if ($a_cron[$_GET['id']]) {
- unset($a_cron[$_GET['id']]);
- write_config();
- header("Location: cron.php");
- exit;
- }
- }
+ if ($_GET['type'] == 'php') {
+ if ($a_cron[$_GET['id']]) {
+ unset($a_cron[$_GET['id']]);
+ write_config();
+ header("Location: cron.php");
+ exit;
+ }
+ }
}
-$pgtitle = array(gettext("Cron"),gettext("Settings"));
+$pgtitle = array(gettext("Cron"), gettext("Settings"));
include("head.inc");
?>
@@ -56,134 +56,133 @@ include("head.inc");
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tabs">
<tr><td class="tabnavtbl">
<?php
-
+
$tab_array = array();
$tab_array[] = array(gettext("Settings"), true, "/packages/cron/cron.php");
$tab_array[] = array(gettext("Edit"), false, "/packages/cron/cron_edit.php");
- display_top_tabs($tab_array);
-
+ display_top_tabs($tab_array);
+
?>
</td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content">
- <tr>
- <td class="tabcont" >
+ <tr>
+ <td class="tabcont" >
<form action="cron.php" method="post" name="iform" id="iform">
-<?php
+<?php
if ($config_change == 1) {
- write_config();
- $config_change = 0;
+ write_config();
+ $config_change = 0;
}
-//if ($savemsg) print_info_box($savemsg);
+//if ($savemsg) print_info_box($savemsg);
//if (file_exists($d_hostsdirty_path)): echo"<p>";
//print_info_box_np("This is an info box.");
//echo"<br />";
-//endif;
+//endif;
?>
- <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="title">
- <tr>
- <td><p><!--<span class="vexpl"><span class="red"><strong>Cron<br></strong></span>-->
- Cron controls the scheduling of commands.
- <br /><br />
- For more information see: <a href='http://www.freebsd.org/doc/en/books/handbook/configtuning-cron.html' target='_blank'>http://www.freebsd.org/doc/en/books/handbook/configtuning-cron.html</a>
- </p></td>
- </tr>
- </table>
- <br />
-
- <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="heading">
- <tr>
- <td width="5%" class="listhdrr">minute</td>
- <td width="5%" class="listhdrr">hour</td>
- <td width="5%" class="listhdrr">mday</td>
- <td width="5%" class="listhdrr">month</td>
- <td width="5%" class="listhdrr">wday</td>
- <td width="5%" class="listhdrr">who</td>
- <td width="60%" class="listhdr">command</td>
- <td width="10%" class="list">
-
- <table border="0" cellspacing="0" cellpadding="1" summary="icons">
- <tr>
- <td width="17"></td>
- <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="edit" /></a></td>
- </tr>
- </table>
-
- </td>
- </tr>
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="title">
+ <tr>
+ <td>
+ <p><!--<span class="vexpl"><span class="red"><strong>Cron<br></strong></span>-->
+ Cron controls the scheduling of commands.
+ <br /><br />
+ For more information see: <a href='http://www.freebsd.org/doc/en/books/handbook/configtuning-cron.html' target='_blank'>http://www.freebsd.org/doc/en/books/handbook/configtuning-cron.html</a>
+ </p>
+ </td>
+ </tr>
+ </table>
+ <br />
+
+ <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="heading">
+ <tr>
+ <td width="5%" class="listhdrr">minute</td>
+ <td width="5%" class="listhdrr">hour</td>
+ <td width="5%" class="listhdrr">mday</td>
+ <td width="5%" class="listhdrr">month</td>
+ <td width="5%" class="listhdrr">wday</td>
+ <td width="5%" class="listhdrr">who</td>
+ <td width="60%" class="listhdr">command</td>
+ <td width="10%" class="list">
+ <table border="0" cellspacing="0" cellpadding="1" summary="icons">
+ <tr>
+ <td width="17"></td>
+ <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="edit" /></a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+ <?php
+
+ $i = 0;
+ if (count($a_cron) > 0) {
+ foreach ($a_cron as $ent) {
+
+ ?>
+
+ <tr>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
+ <?=$ent['minute'];?>&nbsp;
+ </td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
+ <?=$ent['hour'];?>&nbsp;
+ </td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
+ <?=$ent['mday'];?>&nbsp;
+ </td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
+ <?=$ent['month'];?>&nbsp;
+ </td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
+ <?=$ent['wday'];?>&nbsp;
+ </td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
+ <?=$ent['who'];?>&nbsp;
+ </td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
+ <?=$ent['command'];?>&nbsp;
+ </td>
+ <td valign="middle" style="white-space:nowrap" class="list">
+ <table border="0" cellspacing="0" cellpadding="1" summary="edit delete">
+ <tr>
+ <td valign="middle"><a href="cron_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" /></a></td>
+ <td><a href="cron_edit.php?type=php&amp;act=del&amp;id=<?=$i;?>" onclick="return confirm('Do you really want to delete this?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /></a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <?php
+
+ $i++;
+ }
+ }
+ ?>
+
+ <tr>
+ <td class="list" colspan="7"></td>
+ <td class="list">
+ <table border="0" cellspacing="0" cellpadding="1" summary="add">
+ <tr>
+ <td width="17"></td>
+ <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="list" colspan="8"></td>
+ <td class="list"></td>
+ </tr>
+ </table>
-
- <?php
-
- $i = 0;
- if (count($a_cron) > 0) {
-
- foreach ($a_cron as $ent) {
-
- ?>
-
- <tr>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['minute'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['hour'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['mday'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['month'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['wday'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['who'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['command'];?>&nbsp;
- </td>
- <td valign="middle" style="white-space:nowrap" class="list">
- <table border="0" cellspacing="0" cellpadding="1" summary="edit delete">
- <tr>
- <td valign="middle"><a href="cron_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" /></a></td>
- <td><a href="cron_edit.php?type=php&amp;act=del&amp;id=<?=$i;?>" onclick="return confirm('Do you really want to delete this?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /></a></td>
- </tr>
- </table>
- </td>
- </tr>
- <?php
-
- $i++;
- }
- }
- ?>
-
- <tr>
- <td class="list" colspan="7"></td>
- <td class="list">
- <table border="0" cellspacing="0" cellpadding="1" summary="add">
- <tr>
- <td width="17"></td>
- <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td>
- </tr>
- </table>
- </td>
- </tr>
-
-
- <tr>
- <td class="list" colspan="8"></td>
- <td class="list"></td>
- </tr>
- </table>
-
</form>
@@ -196,13 +195,12 @@ if ($config_change == 1) {
<br />
<br />
-</td>
-</tr>
+ </td>
+ </tr>
</table>
</div>
-
<?php include("fend.inc"); ?>
</body>
</html>
diff --git a/config/cron/cron.xml b/config/cron/cron.xml
index ba70e5e5..5a2b770b 100644
--- a/config/cron/cron.xml
+++ b/config/cron/cron.xml
@@ -2,44 +2,44 @@
<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
<packagegui>
- <copyright>
- <![CDATA[
+ <copyright>
+ <![CDATA[
/* $Id$ */
/* ========================================================================== */
/*
- cron.xml
- Copyright (C) 2008 Mark J Crane
- All rights reserved.
- */
+ cron.xml
+ Copyright (C) 2008 Mark J Crane
+ All rights reserved.
+ */
/* ========================================================================== */
/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
/* ========================================================================== */
- ]]>
- </copyright>
- <description>Cron</description>
- <requirements>Describe your package requirements here</requirements>
- <faq>Currently there are no FAQ items provided.</faq>
+ ]]>
+ </copyright>
+ <description>Cron</description>
+ <requirements>Describe your package requirements here</requirements>
+ <faq>Currently there are no FAQ items provided.</faq>
<name>Cron Settings</name>
<version>0.2.2</version>
<title>Settings</title>
@@ -62,32 +62,32 @@
<text>Settings</text>
<url>/packages/cron.php</url>
<active/>
- </tab>
+ </tab>
</tabs>
<configpath>installedpackages->package->$packagename->configuration->cron</configpath>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
+ <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/cron.xml</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
+ <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/cron.inc</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/packages/cron/</prefix>
- <chmod>0755</chmod>
+ <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/cron.php</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/packages/cron/</prefix>
- <chmod>0755</chmod>
+ <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/cron_edit.php</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/packages/cron/</prefix>
- <chmod>0755</chmod>
+ <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/index.php</item>
</additional_files_needed>
<fields>
@@ -103,13 +103,13 @@
<description>Enter the variable one here.</description>
<type>input</type>
</field>
- </fields>
+ </fields>
<custom_add_php_command>
</custom_add_php_command>
<custom_php_resync_config_command>
cron_sync_package();
</custom_php_resync_config_command>
- <custom_delete_php_command>
+ <custom_delete_php_command>
cron_sync_package();
</custom_delete_php_command>
<custom_php_install_command>
diff --git a/config/cron/cron_edit.php b/config/cron/cron_edit.php
index 12fde39d..2b72a04d 100644
--- a/config/cron/cron_edit.php
+++ b/config/cron/cron_edit.php
@@ -1,21 +1,21 @@
-<?php
+<?php
/* $Id$ */
/*
cron_edit.php
Copyright (C) 2008 Mark J Crane
All rights reserved.
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
-
+
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
+
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
@@ -32,7 +32,7 @@ require_once("guiconfig.inc");
require_once("/usr/local/pkg/cron.inc");
-$a_cron = &$config['cron']['item'];
+$a_cron = &$config['cron']['item'];
$id = $_GET['id'];
if (isset($_POST['id'])) {
@@ -41,13 +41,13 @@ if (isset($_POST['id'])) {
if ($_GET['act'] == "del") {
if ($_GET['type'] == 'php') {
- if ($a_cron[$_GET['id']]) {
- unset($a_cron[$_GET['id']]);
- write_config();
- cron_sync_package();
- header("Location: cron.php");
- exit;
- }
+ if ($a_cron[$_GET['id']]) {
+ unset($a_cron[$_GET['id']]);
+ write_config();
+ cron_sync_package();
+ header("Location: cron.php");
+ exit;
+ }
}
}
@@ -60,14 +60,14 @@ if (isset($id) && $a_cron[$id]) {
$pconfig['wday'] = $a_cron[$id]['wday'];
$pconfig['who'] = $a_cron[$id]['who'];
$pconfig['command'] = $a_cron[$id]['command'];
-
+
}
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
-
+
if (!$input_errors) {
$ent = array();
@@ -80,17 +80,16 @@ if ($_POST) {
$ent['command'] = $_POST['command'];
if (isset($id) && $a_cron[$id]) {
- //update
- $a_cron[$id] = $ent;
- }
- else {
- //add
+ //update
+ $a_cron[$id] = $ent;
+ } else {
+ //add
$a_cron[] = $ent;
}
-
+
write_config();
cron_sync_package();
-
+
header("Location: cron.php");
exit;
}
@@ -106,7 +105,7 @@ include("head.inc");
<script type="text/javascript">
//<![CDATA[
function show_advanced_config() {
- document.getElementById("showadvancedbox").innerHTML='';
+ document.getElementById("showadvancedbox").innerHTML = '';
aodiv = document.getElementById('showadvanced');
aodiv.style.display = "block";
//]]>
@@ -121,162 +120,160 @@ function show_advanced_config() {
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="mainlevel">
<tr><td class="tabnavtbl">
<?php
-
+
$tab_array = array();
$tab_array[] = array(gettext("Settings"), false, "/packages/cron/cron.php");
$tab_array[] = array(gettext("Edit"), true, "/packages/cron/cron_edit.php");
display_top_tabs($tab_array);
-
+
?>
</td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="mainarea">
- <tr>
- <td class="tabcont" >
-
- <!--
- <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="title">
- <tr>
- <td><p><span class="vexpl"><span class="red"><strong>Cron<br />
- </strong></span>
- </p></td>
- </tr>
- </table>
- -->
- <br />
-
- <form action="cron_edit.php" method="post" name="iform" id="iform">
- <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="form">
-
-
-
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">minute</td>
- <td width="75%" class="vtable">
- <input name="minute" type="text" class="formfld" id="minute" size="40" value="<?=htmlspecialchars($pconfig['minute']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">hour</td>
- <td width="75%" class="vtable">
- <input name="hour" type="text" class="formfld" id="hour" size="40" value="<?=htmlspecialchars($pconfig['hour']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">mday</td>
- <td width="75%" class="vtable">
- <input name="mday" type="text" class="formfld" id="mday" size="40" value="<?=htmlspecialchars($pconfig['mday']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">month</td>
- <td width="75%" class="vtable">
- <input name="month" type="text" class="formfld" id="month" size="40" value="<?=htmlspecialchars($pconfig['month']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">wday</td>
- <td width="75%" class="vtable">
- <input name="wday" type="text" class="formfld" id="wday" size="40" value="<?=htmlspecialchars($pconfig['wday']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">who</td>
- <td width="75%" class="vtable">
- <input name="who" type="text" class="formfld" id="who" size="40" value="<?=htmlspecialchars($pconfig['who']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">command</td>
- <td width="75%" class="vtable">
- <!-- <input name="command" type="text" class="formfld" id="command" size="40" value="<?=htmlspecialchars($pconfig['command']);?>" /> -->
- <textarea rows="3" cols="68" name="command" id="command"><?=htmlspecialchars($pconfig['command']);?></textarea>
- </td>
- </tr>
- <!--
- <tr>
- <td width="22%" valign="top" class="vncell">PHP</td>
- <td width="78%" class="vtable">
- -->
- <?php
- //echo "<textarea name=\"php\" id=\"php\" cols=\"70\" rows=\"15\" wrap=\"off\">".htmlspecialchars($pconfig['php'])."</textarea>\n";
- ?>
- <!--
- <br>
- <select name='dialplan_expression_select' id='dialplan_expression_select' onchange="document.getElementById('dialplan_expression').value += document.getElementById('dialplan_expression_select').value + '\n';" class='formfld'>
- <option></option>
- <option value='snortkillsessions'>snort kill sessions</option>
- </select>
- <span class="vexpl">
- <br />
- </span>
- </td>
- </tr>
- -->
- <!--
- <tr>
- <td width="22%" valign="top" class="vncellreq">Enabled</td>
- <td width="78%" class="vtable">
- <?php
- echo " <select name='enabled' class='formfld'>\n";
- echo " <option></option>\n";
- switch (htmlspecialchars($pconfig['enabled'])) {
- case "true":
- echo " <option value='true' selected='selected'>true</option>\n";
- echo " <option value='false'>false</option>\n";
- break;
- case "false":
- echo " <option value='true'>true</option>\n";
- echo " <option value='false' selected='selected'>false</option>\n";
-
- break;
- default:
- echo " <option value='true' selected='selected'>true</option>\n";
- echo " <option value='false'>false</option>\n";
- }
- echo " </select>\n";
- ?>
- </td>
- </tr>
- -->
- <!--
- <tr>
- <td width="25%" valign="top" class="vncellreq">Description</td>
- <td width="75%" class="vtable">
- <input name="description" type="text" class="formfld" id="description" size="40" value="<?=htmlspecialchars($pconfig['description']);?>" />
- <br /><span class="vexpl">Enter the description here.<br /></span>
- </td>
- </tr>
- -->
-
- <tr>
- <td valign="top">&nbsp;</td>
- <td>
- <input name="Submit" type="submit" class="formbtn" value="Save" /> <input class="formbtn" type="button" value="Cancel" onclick="history.back()" />
- <?php if (isset($id) && $a_cron[$id]): ?>
- <input name="id" type="hidden" value="<?=$id;?>" />
- <?php endif; ?>
- </td>
- </tr>
- </table>
- </form>
-
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
-
- </td>
- </tr>
+ <tr>
+ <td class="tabcont" >
+
+ <!--
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="title">
+ <tr>
+ <td>
+ <p>
+ <span class="vexpl"><span class="red"><strong>Cron<br /></strong></span>
+ </p>
+ </td>
+ </tr>
+ </table>
+ -->
+ <br />
+
+ <form action="cron_edit.php" method="post" name="iform" id="iform">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="form">
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">minute</td>
+ <td width="75%" class="vtable">
+ <input name="minute" type="text" class="formfld" id="minute" size="40" value="<?=htmlspecialchars($pconfig['minute']);?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">hour</td>
+ <td width="75%" class="vtable">
+ <input name="hour" type="text" class="formfld" id="hour" size="40" value="<?=htmlspecialchars($pconfig['hour']);?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">mday</td>
+ <td width="75%" class="vtable">
+ <input name="mday" type="text" class="formfld" id="mday" size="40" value="<?=htmlspecialchars($pconfig['mday']);?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">month</td>
+ <td width="75%" class="vtable">
+ <input name="month" type="text" class="formfld" id="month" size="40" value="<?=htmlspecialchars($pconfig['month']);?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">wday</td>
+ <td width="75%" class="vtable">
+ <input name="wday" type="text" class="formfld" id="wday" size="40" value="<?=htmlspecialchars($pconfig['wday']);?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">who</td>
+ <td width="75%" class="vtable">
+ <input name="who" type="text" class="formfld" id="who" size="40" value="<?=htmlspecialchars($pconfig['who']);?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">command</td>
+ <td width="75%" class="vtable">
+ <!-- <input name="command" type="text" class="formfld" id="command" size="40" value="<?=htmlspecialchars($pconfig['command']);?>" /> -->
+ <textarea rows="3" cols="68" name="command" id="command"><?=htmlspecialchars($pconfig['command']);?></textarea>
+ </td>
+ </tr>
+ <!--
+ <tr>
+ <td width="22%" valign="top" class="vncell">PHP</td>
+ <td width="78%" class="vtable">
+ -->
+ <?php
+ //echo "<textarea name=\"php\" id=\"php\" cols=\"70\" rows=\"15\" wrap=\"off\">".htmlspecialchars($pconfig['php'])."</textarea>\n";
+ ?>
+ <!--
+ <br>
+ <select name='dialplan_expression_select' id='dialplan_expression_select' onchange="document.getElementById('dialplan_expression').value += document.getElementById('dialplan_expression_select').value + '\n';" class='formfld'>
+ <option></option>
+ <option value='snortkillsessions'>snort kill sessions</option>
+ </select>
+ <span class="vexpl">
+ <br />
+ </span>
+ </td>
+ </tr>
+ -->
+ <!--
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Enabled</td>
+ <td width="78%" class="vtable">
+ <?php
+ echo " <select name='enabled' class='formfld'>\n";
+ echo " <option></option>\n";
+ switch (htmlspecialchars($pconfig['enabled'])) {
+ case "true":
+ echo " <option value='true' selected='selected'>true</option>\n";
+ echo " <option value='false'>false</option>\n";
+ break;
+ case "false":
+ echo " <option value='true'>true</option>\n";
+ echo " <option value='false' selected='selected'>false</option>\n";
+
+ break;
+ default:
+ echo " <option value='true' selected='selected'>true</option>\n";
+ echo " <option value='false'>false</option>\n";
+ }
+ echo " </select>\n";
+ ?>
+ </td>
+ </tr>
+ -->
+ <!--
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">Description</td>
+ <td width="75%" class="vtable">
+ <input name="description" type="text" class="formfld" id="description" size="40" value="<?=htmlspecialchars($pconfig['description']);?>" />
+ <br /><span class="vexpl">Enter the description here.<br /></span>
+ </td>
+ </tr>
+ -->
+
+ <tr>
+ <td valign="top">&nbsp;</td>
+ <td>
+ <input name="Submit" type="submit" class="formbtn" value="Save" /> <input class="formbtn" type="button" value="Cancel" onclick="history.back()" />
+ <?php if (isset($id) && $a_cron[$id]): ?>
+ <input name="id" type="hidden" value="<?=$id;?>" />
+ <?php endif; ?>
+ </td>
+ </tr>
+ </table>
+ </form>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+
+ </td>
+ </tr>
</table>
</div>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 6eaf2ddb..7c9ce26c 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -374,7 +374,7 @@
<descr>The cron utility is used to manage commands on a schedule.</descr>
<category>Services</category>
<config_file>https://packages.pfsense.org/packages/config/cron/cron.xml</config_file>
- <version>0.1.9</version>
+ <version>0.1.10</version>
<status>Beta</status>
<required_version>2.2</required_version>
<maintainer>markjcrane@gmail.com</maintainer>
n1778' href='#n1778'>1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636