{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/25602","labels_url":"https://api.github.com/repos/saltstack/salt/issues/25602/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/25602/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/25602/events","html_url":"https://github.com/saltstack/salt/issues/25602","id":96461456,"number":25602,"title":"TypeError: run() takes at least 1 argument (2 given)","user":{"login":"yellow1912","id":374134,"avatar_url":"https://avatars.githubusercontent.com/u/374134?v=3","gravatar_id":"","url":"https://api.github.com/users/yellow1912","html_url":"https://github.com/yellow1912","followers_url":"https://api.github.com/users/yellow1912/followers","following_url":"https://api.github.com/users/yellow1912/following{/other_user}","gists_url":"https://api.github.com/users/yellow1912/gists{/gist_id}","starred_url":"https://api.github.com/users/yellow1912/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yellow1912/subscriptions","organizations_url":"https://api.github.com/users/yellow1912/orgs","repos_url":"https://api.github.com/users/yellow1912/repos","events_url":"https://api.github.com/users/yellow1912/events{/privacy}","received_events_url":"https://api.github.com/users/yellow1912/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Question","name":"Question","color":"942192"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestones/Blocked","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":269,"closed_issues":595,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2015-07-22T22:43:56Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-07-22T02:43:13Z","updated_at":"2015-07-23T05:47:46Z","closed_at":null,"body":"The error itself is weird enough, if it takes at least 1 arg then why can't I give it more than 1?\r\n\r\nAnyhow, below is the brief info of my current setup:\r\nSalt version: 2015.5.0\r\n``` bash \r\nsalt --versions-report\r\n                  Salt: 2015.5.0\r\n                Python: 2.7.9 (default, Apr  2 2015, 15:33:21)\r\n                Jinja2: 2.7.3\r\n              M2Crypto: 0.21.1\r\n        msgpack-python: 0.4.2\r\n          msgpack-pure: Not Installed\r\n              pycrypto: 2.6.1\r\n               libnacl: Not Installed\r\n                PyYAML: 3.11\r\n                 ioflo: Not Installed\r\n                 PyZMQ: 14.4.1\r\n                  RAET: Not Installed\r\n                   ZMQ: 4.0.5\r\n                  Mako: Not Installed\r\n\r\n```\r\nschedule.sls in srv/salt (which is then included in top file)\r\n\r\n``` yaml\r\njob2:\r\n    schedule.present:\r\n      - function: cmd.run\r\n      - seconds: 120\r\n      - splay: 10\r\n      - job_kwargs:\r\n          name: 'composer update -o'\r\n          cwd: '/project/source/development'\r\n          env: '{\"HOME\": \"/root\"}'\r\n\r\n```\r\n\r\nError I get:\r\n\r\n``` bash\r\n2015-07-22 01:34:39,842 [salt.utils.schedule][ERROR   ][10090] Unhandled exception running cmd.run\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/dist-packages/salt/utils/schedule.py\", line 542, in handle_func\r\n    ret['return'] = self.functions[func](*args, **kwargs)\r\nTypeError: run() takes at least 1 argument (2 given)\r\n2015-07-22 01:36:43,076 [salt.utils.schedule][ERROR   ][13269] Unhandled exception running cmd.run\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/dist-packages/salt/utils/schedule.py\", line 542, in handle_func\r\n    ret['return'] = self.functions[func](*args, **kwargs)\r\nTypeError: run() takes at least 1 argument (2 given)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/123980682","html_url":"https://github.com/saltstack/salt/issues/25602#issuecomment-123980682","issue_url":"https://api.github.com/repos/saltstack/salt/issues/25602","id":123980682,"user":{"login":"jfindlay","id":702905,"avatar_url":"https://avatars.githubusercontent.com/u/702905?v=3","gravatar_id":"","url":"https://api.github.com/users/jfindlay","html_url":"https://github.com/jfindlay","followers_url":"https://api.github.com/users/jfindlay/followers","following_url":"https://api.github.com/users/jfindlay/following{/other_user}","gists_url":"https://api.github.com/users/jfindlay/gists{/gist_id}","starred_url":"https://api.github.com/users/jfindlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfindlay/subscriptions","organizations_url":"https://api.github.com/users/jfindlay/orgs","repos_url":"https://api.github.com/users/jfindlay/repos","events_url":"https://api.github.com/users/jfindlay/events{/privacy}","received_events_url":"https://api.github.com/users/jfindlay/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T05:47:45Z","updated_at":"2015-07-23T05:47:45Z","body":"@yellow1912, yes sorry, that was a typo.\r\n\r\nHere are some additional things to try:\r\n```yaml\r\njob2:\r\n  schedule.present:\r\n    - function: cmd.run\r\n    - seconds: 120\r\n    - splay: 10\r\n    - job_args:\r\n      - 'composer update -o'\r\n    - job_kwargs:\r\n        cwd: '/project/source/development'\r\n        env: \r\n          HOME: /root\r\n```\r\n```yaml\r\njob2:\r\n  schedule.present:\r\n    - function: cmd.run\r\n    - seconds: 120\r\n    - splay: 10\r\n    - job_args:\r\n      - 'HOME=/root composer update -o'\r\n    - job_kwargs:\r\n        cwd: '/project/source/development'\r\n```"}}