Determine all integers $n$ for which there exist an integer $k\geq 2$ and positive integers $x_1,x_2,\hdots,x_k$ so that
$$x_1x_2+x_2x_3+\hdots+x_{k-1}x_k=n\text{ and } x_1+x_2+\hdots+x_k=2019.$$
1. **Claim**: The answer is all positive integers \( n \) in the range \([2018, 1009 \cdot 1010]\).

2. **Upper Bound**: 
   - Consider the sum \( x_1 + x_2 + \cdots + x_k = 2019 \).
   - We need to show that \( x_1 x_2 + x_2 x_3 + \cdots + x_{k-1} x_k \leq 1009 \cdot 1010 \).
   - By the Cauchy-Schwarz inequality, we have:
     \[
     \left( \sum_{i=1}^{k-1} x_i x_{i+1} \right) \leq \left( \sum_{i=1}^{k-1} x_i^2 \right) \left( \sum_{i=1}^{k-1} x_{i+1}^2 \right)
     \]
   - However, a simpler approach is to consider the product of sums:
     \[
     \left( \sum_{2|i} x_i \right) \left( \sum_{2|i-1} x_i \right) \geq x_1 x_2 + x_2 x_3 + \cdots + x_{k-1} x_k = n
     \]
   - Since \( \sum_{2|i} x_i + \sum_{2|i-1} x_i = 2019 \), the maximum product is achieved when the sums are as equal as possible:
     \[
     \left( \sum_{2|i} x_i \right) \left( \sum_{2|i-1} x_i \right) \leq 1009 \cdot 1010
     \]
   - Therefore, \( n \leq 1009 \cdot 1010 \).

3. **Lower Bound**:
   - Consider the case where \( x_i = 1 \) for all \( i \). Then:
     \[
     x_1 x_2 + x_2 x_3 + \cdots + x_{k-1} x_k = 1 \cdot 1 + 1 \cdot 1 + \cdots + 1 \cdot 1 = k-1
     \]
   - Since \( x_1 + x_2 + \cdots + x_k = 2019 \), the minimum value of \( k \) is 2, giving:
     \[
     n = 2018
     \]
   - Hence, the minimum possible value of \( x_1 x_2 + x_2 x_3 + \cdots + x_{k-1} x_k \) is 2018.

4. **Constructing \( n \) in the interval**:
   - Fix \( 2018 \leq n \leq 1009 \cdot 1010 \).
   - Suppose \( 1 \leq k \leq 1008 \) such that \( k(2019 - k) \leq n < (k+1)(2018 - k) \).
   - Consider setting \( x_1 = a \), \( x_2 = k+1 - b \), \( x_3 = 2018 - k - a \), \( x_4 = b \) for some \( a, b \) to be specified later.
   - Then:
     \[
     x_1 x_2 + x_2 x_3 + x_3 x_4 = (k+1)(2018 - k) - ab
     \]
   - If we can find \( 1 \leq a \leq 2018 - k \) and \( 1 \leq b \leq k+1 \) such that:
     \[
     ab = (k+1)(2018 - k) - n
     \]
   - Notice that:
     \[
     (k+1)(2018 - k) - n \leq (k+1)(2018 - k) - k(2019 - k) = 2018 - 2k
     \]
   - Hence, we can set \( a = (k+1)(2018 - k) - n \) and \( b = 1 \) because \( 2018 - k \geq 2018 - 2k \).

5. **Conclusion**:
   - By iterating the above process for all \( 1 \leq k \leq 1009 \), we have shown that all \( n \in [2018, 1009 \cdot 1010] \) indeed satisfy the condition of the problem.

The final answer is \( \boxed{ [2018, 1009 \cdot 1010] } \)