Suppose you want to obtain a faculty job at a particular time. When should you start searching for job ads? When are they advertised?
Answers describing different customs in different countries and disciplines are encouraged.
The field of academia is hypercompetitive due to the excess amount of PhD-students and Postdocs vs a low number of faculty positions (read this). Even people doing postdocs at top places have difficulties finding faculty positions and apart from a network also luck becomes an important factor if there are >100 applications for a faculty position.
Therefore you should start searching for a faculty position at least 2 years ahead (no, this is not a joke).
In the United States, many permanent faculty jobs are advertised around September. Applications are due in December or January. The positions start in August, nearly a year after the position is advertised.
Lest prestigious universities advertise later. In some cases they may advertise only a few months before the job begins. Temporary jobs also have reduced lead-time.
Practices can vary widely.
In Operations Management, for US universities (or Canadian, European and Asian universities following the US system), most jobs are advertised in forums and websites (like Operations Academia, the INFORMS communities, the M&SOM forum, and the POMS society website) mostly from August to early October, for tenure-track jobs to begin on the following July to September. Our big conference, INFORMS, where the short interviews occur, is in late October or early November. Applications are due a couple weeks before this big conference. Most campus interviews occur from early December to late February, and most offers occur in February, but some offers are given in December and some are in late March. This is a field where there are almost as many tenure-track jobs as there are job market candidates, so we usually only go on the job market on our last year in the PhD program.
Now, this timeline varies hugely by field and country. (Even within my field there are huge variations, like late April job offers.)