4 * check_stale_tracker_items.php - Check for stale tracker items.
6 * This script goes through the database looking for tracker items that have a
7 * status of 'Pending' older than the admin-defined timeout period. The items
8 * that it finds it goes ahead and closes them out.
10 * Copyright 1999-2001 (c) VA Linux Systems
12 * @author Darrell Brogdon dbrogdon@valinux.com
15 * This file is part of FusionForge. FusionForge is free software;
16 * you can redistribute it and/or modify it under the terms of the
17 * GNU General Public License as published by the Free Software
18 * Foundation; either version 2 of the Licence, or (at your option)
21 * FusionForge is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License along
27 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
28 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
31 require dirname(__FILE__).'/../www/env.inc.php';
32 require_once $gfcommon.'include/pre.php';
33 require $gfcommon.'include/cron_utils.php';
35 $res = db_query_params ('UPDATE artifact SET status_id = 2
36 WHERE artifact_id IN (
38 FROM artifact a NATURAL JOIN artifact_group_list agl
39 WHERE (agl.status_timeout + a.close_date) < $1
43 cron_entry(2,db_error());
47 // c-file-style: "bsd"