Command line only part of Jacinthe management tools, extracted from Jacman as a gem
2.4
- _jacman-utils
- jacman-ip
- j2r_jaccess and j2r-core for 'dashboard' method
Can be used, either as a gem, or directly through three script tools.
batman: batch manager for plain users (usual commands)cronman: batch manager for cron daemon with reports in filesjacdev: batch manager for developers (reserved commands).
Usage : ruby batman <call_name>, idem for cronman or jacdev.
call_name: short call nametitle: title of commandhelp_text: text to be shown in help dialogproc: Proc to be executed.
execute: executes the commandcron_execute: executes the command with output in filesstdout_file,stderr_file: output files ofcron_execute.
Command.fetch(call_name): returns the CommandCommand.cron_run(call_name): "cron executes" the Command.
Infos.reportreturns an Array of items :[value, caption].- Example of item :
[3, 'fichiers clients en cours']
CommandWatcher.report[cmds, limit = 24] where cmds is an Array of call_names and limit is a Numeric,
returns an Array of reports, each of which has the following form :
-
if the last "cron execution" of the command was completed without error,
[tag, file, age]where file is thestdout_fileandageis the age in hours of this file,tagbeing:OKor:LATEaccording to whetherageis< limitor not. -
if the last "cron execution" of the command had errors,
[:ERROR, file]where file is thestderr_file. -
if the command was never "cron executed",
[:NEVER].
For commodity, gem contains sql_do_not_use directory with sql files
- See the Yardoc/RDoc documentation.
- See the html help file
Source code on repository GitHub
(c) 2014, Michel Demazure
Michel Demazure: michel at demazure dot com
