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 GForge.
17 * GForge is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
22 * GForge is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with GForge; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
32 require dirname(__FILE__).'/../www/env.inc.php';
33 require_once $gfwww.'include/pre.php';
34 require $gfcommon.'include/cron_utils.php';
36 $res = db_query_params ('UPDATE artifact SET status_id = 2
37 WHERE artifact_id IN (
39 FROM artifact a NATURAL JOIN artifact_group_list agl
40 WHERE (agl.status_timeout + a.close_date) < $1
44 cron_entry(2,db_error());
48 // c-file-style: "bsd"