crash.commands.cron.cron.groovy Maven / Gradle / Ivy
package crash.commands.cron
import org.crsh.cli.Argument
import org.crsh.cli.Command
import org.crsh.cli.Usage
import org.crsh.command.InvocationContext
import org.crsh.cron.CRaSHTaskProcess
import org.crsh.cron.CronPlugin
import org.crsh.groovy.GroovyCommand
import org.crsh.plugin.PluginContext
import org.crsh.shell.impl.command.CRaSH;
@Usage("manages the cron plugin")
public class cron extends GroovyCommand {
private CronPlugin getCronPlugin() {
PluginContext context = getPluginContext()
return context.getPlugin(CronPlugin.class);
}
private PluginContext getPluginContext() {
CRaSH crash = (CRaSH)context.session["crash"];
def context = crash.getContext()
context
}
@Command
@Usage("display the process history")
public void history(InvocationContext