11import { Command , flags } from '@oclif/command'
2+ import chalk from 'chalk'
3+ import { isValidCron } from 'cron-validator'
24import cronstrue from 'cronstrue'
3- import CryptoJS from 'crypto-js'
45
56import Logger from '../utilities/logger'
67import Utilities from '../utilities/utilities'
7-
8- import { isValidCron } from 'cron-validator'
9- import chalk from "chalk" ;
108/*
119* this Commands add support for cron jobs
1210* */
@@ -34,7 +32,7 @@ export default class Cron extends Command {
3432
3533 //check params after evaluating all
3634 this . checkParameters ( flags , args )
37- this . eval ( flags , args )
35+ this . evalCron ( flags , args )
3836 }
3937
4038 // to check required parameters passed or not
@@ -51,16 +49,18 @@ export default class Cron extends Command {
5149 Logger . error ( this , 'Action empty or undefined' )
5250 }
5351
54- private eval ( flags : any , args : any ) {
52+ // tslint:disable-next-line:no-unused
53+ private evalCron ( flags : any , args : any ) {
5554 // Logger.success(this, `Action: ${chalk.green(args.action)}`)
5655 if ( args . action === Cron . DESCRIBE ) {
5756 let output = cronstrue . toString ( args . string )
5857 Logger . success ( this , output )
59- } else if ( args . action === Cron . RUN ) {
58+ } else if ( args . action === Cron . RUN ) {
6059 Logger . success ( this , 'run command, coming soon...' )
6160 }
6261 }
6362
63+ // tslint:disable-next-line:no-unused
6464 private getAction ( flags : any , args : any ) {
6565 if ( flags . describe ) // find human readable descriptions for cron
6666 return Cron . DESCRIBE
0 commit comments