-3

I need to run my cron after every 45 days in single line of shell terminal. Please provide some solution for the same

Thanks

sachin sawant
  • 231
  • 1
  • 2
  • 3

1 Answers1

1

* * */45 * * /temp/command.sh

It works in linux, but it can't be accepted by hp unix.

There is another choice: run below command every day:

[ $(( ($(date +%s)/86400) % 45 )) -eq 0 ] && /temp/command.sh

oldmonk
  • 739
  • 4
  • 10