Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Building a cron trigger which execute every two weeks

 
sivachithambaram Rangaraj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone help me out in building a cron trigger which execute every two weeks on some specified weekday...
 
Josh Stephens
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try typing in


this will setup the crontab which is like scheduled tasks.

the normal cron has the following format

* * * * * /path/to/command

the first * is the minute 0 - 59
the second * is the hour 0 - 23
the third * is the Day of Month 1 - 31
the fourth * is the Month 1 - 12
the last * is the Day of Week 0 - 6 (Sunday = 0)

so an example using myscript.sh

0 0 1 * * /bin/myscript.sh

This would execute myscript.sh at midnight the first day of each month.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic