Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

I like to run every 3 mnth a shell script

Mon Nov 25, 2019 3:07 pm

I do like to run every 3 mnth at 23:00 hr a shellscript called fileconv.sh
I did make a crontab command like:

0 23 * */3 * sh /home/ewh/fileconv.sh

Is this right?
Thanks in advance

pcmanbob
Posts: 9465
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: I like to run every 3 mnth a shell script

Mon Nov 25, 2019 3:46 pm

That cron line would run your script every day of every third month at 23:00

if you only want it to run once a month then you need to specify a day as well

for example on the 1st day of the month.

0 23 1 */3 * sh /home/ewh/fileconv.sh
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: I like to run every 3 mnth a shell script

Mon Nov 25, 2019 3:56 pm

Thanks for the help
I will change the script

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: I like to run every 3 mnth a shell script

Mon Nov 25, 2019 4:02 pm

Or look at Remind which can run a script based on any calendar date.
https://www.roaringpenguin.com/wiki/index.php/Remind

sudo apt install remind
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

deepo
Posts: 580
Joined: Sun Dec 30, 2018 8:36 pm
Location: Denmark

Re: I like to run every 3 mnth a shell script

Mon Nov 25, 2019 6:46 pm

https://crontab-generator.org/ is good, it will tell you when the script will run.

/Mogens

Return to “Beginners”