Add Cron from cli not working ?

Questions regarding the Command Line Interface
CLI
skamasle
Collaborator
Posts: 382
Joined: Mon Feb 29, 2016 6:36 pm

Add Cron from cli not working ?

Postby skamasle » Mon Apr 04, 2016 10:11 pm

Hi

I try to add cron jobs from cli but not working by default whit asterisk

Code: Select all

v-add-cron-job admin 0 0 1 1 *  comand


This return:

Error: wday addons is not valid

Same code working fine whit out asterisk:

Code: Select all

v-add-cron-job admin 0 0 1 1 3 comand


I dont have time to debug it, so I ask here :)

skamasle
Collaborator
Posts: 382
Joined: Mon Feb 29, 2016 6:36 pm

Re: Add Cron from cli not working ?

Postby skamasle » Fri Apr 08, 2016 6:15 pm

So it not working because is not posible pass asterisk as argument in cli bash take all file names of directory.

So v-add-cron-job not working fine..

EDIT...

Solved it whit set -f or scaping \

Not is the way but working

ymakux
Posts: 4
Joined: Sat Oct 22, 2016 7:07 am

Re: Add Cron from cli not working ?

Postby ymakux » Sat Oct 22, 2016 7:09 am

Can you please post an example of working command? I've tried everything but still no luck

skurudo
VestaCP Team
Posts: 7798
Joined: Fri Dec 26, 2014 2:23 pm
Location: Moscow
Contact:

Re: Add Cron from cli not working ?

Postby skurudo » Wed Oct 26, 2016 1:57 pm

$ v-add-cron-job
Usage: USER MIN HOUR DAY MONTH WDAY COMMAND [JOB] [RESTART]


Like this:

Code: Select all

 v-add-cron-job user '*' '*' '*' '*' '*'  /path/test.sh
-> DigitalOcean competition - please, support us
-> fix for phpmyadmin - nice and sweet now


Return to “CLI”



Who is online

Users browsing this forum: Bing [Bot] and 2 guests