He was born in 1854 in Udine, where his father served as a military officer. From 1869 he attended a military school in Sankt Pölten and then the Maria Theresa Military Academy in Vienna. He graduated here in 1874 and received the rank of lieutenant. From 1877 he took part in the training of staff officers. He served as troops officer or staff officer in various positions. In 1896 he was appointed Chief of Staff of the XIII Corps. Colonel from 1897. From 1903 he was Major General and commander of the 66th Infantry Brigade. From 1912 he was a cavalry general and from 1913 the XIV. Corps commander, and thus the military commander of the entire southwestern military defense district.
Following the mobilization, he was appointed Commander of the 1st Army. This army was located north and east of Krakow towards the San River. For the most part, he envisioned aggressive operations in this area in August aimed at occupying Warsaw. He was given his noble forename in 1918, from the Polish city near which he fought the first victorious battle of the Monarchy in the Great War between 23-25 August 1914, as commander of the 1st Army. For the same warfare, he also received the Commander’s Cross of the Military Order of Maria Theresia Mary in 1917. Despite the achievements, the Monarchy was defeated further east and retreated to the Carpathians. The 1st Army also withdrew and by December the success of defending Krakow had become questionable. Since Chief of Staff, Conrad neglected him in the great offensive in May 1915, Dankl asked to be relocated to the south-western front.
On the Italian front, from 1916, he was appointed commander of the newly organized 11th Army. His army carried out the successful Tyrolean attack on the Italians in 1916. The attack had to be interrupted due to the Brusilov offensive in order to send reinforcements from Tyrol to the Russian front. He subsequently resigned as Army Commander, citing his deteriorating health. He retired as Colonel general. He died on 8 January 1941 in Innsbruck.