I am getting the following error when i try triggering a build using the following command:
curl http://jenkins_server:port/jenkins/job/job_name/build?token=token_name>
Install Parameterized Build plugin
https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build
If you are using an authorization token to trigger the builds (Job -> Configure -> 'Build Triggers' -> 'Trigger builds remotely (e.g., from scripts)'), you can access:
curl -X POST http://server/job/myjob/buildWithParameters?token=TOKEN&PARAMETER=Value