0

So basically I have a python script that checks a webpage for unassigned tickets and notifies me if there is any. My goal is to have a crontab file that runs the .py file every 2 minutes.

If I run the .py file using the following in terminal:

python check.py -u user@email.com -t aaAAAaAAaaAAAa

It functions as desired. However I need to figure out how to add the above user and API token, so that every two minutes the crontab runs the .py using the user/token.

My crontab so far is as follows

2 * * * * /usr/bin/python /Users/usr/Downloads/check-master/check.py

If you could point me in the right direction that would be great, or any advice you can give, thanks in advance.

jasonwryan
  • 73,126
lwaskie
  • 21
  • 3

1 Answers1

0

os.environ['ZENDESK_API_USER'] = 'user@email.com' os.environ['ZENDESK_API_TOKEN'] = 'aaAAAAaaaA' (token)

I added that to the script itself, works fine.

lwaskie
  • 21
  • 3