Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Need help with automating a python script on a Windows server Post 303001083 by tuscanitunr on Wednesday 26th of July 2017 09:27:03 AM
Old 07-26-2017
Need help with automating a python script on a Windows server

Experience level with scripting (1-10 scale): 1-2....still learning!!!


I've got a python script that calls on an API to gather information from a ticketing system. This script is used to track time worked on tickets. My boss is wanting that script to be run once a week. The script runs beautifully....but it's how it was set up that causes an issue with everything.

Right now we have to open a CMD window and type in:

Code:
python time_reports.py Insert JSON Web Token

This gives us all of the previous month. However, if we want a certain date range...we have to type in:

Code:
python time_reports.py Insert JSON Web Token 2017-07-01 2017-07-25

So, the higher ups are wanting that script to be run automatically, but I'm not sure how that's possible with dates always changing.

I was thinking of maybe using a batch file and then using Windows scheduler...but was hoping someone on here could help out with a better way.

Last edited by bakunin; 07-26-2017 at 08:39 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server

I have a .sh script which was running fine on all the UNIX Servers (AIX, SunSolaris). The script requires two mandatory parameters and many optional parameters. Now at a different client place who are on a Windows Server, when I try to execute the script through MKS Toolkit, there are couple of... (5 Replies)
Discussion started by: madhunk
5 Replies

2. Shell Programming and Scripting

Automating file transfer between two SSH enabled server.

Hi Experts, Few more words to the title, both the servers are ssh enabled but I have read only access to the second server, so I cannot automate SFTP process using RSA/DSA keys. I am using Control M to trigger the script and do not want any manual intervention to enter the password to complete... (4 Replies)
Discussion started by: nchourasiya
4 Replies

3. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

4. Windows & DOS: Issues & Discussions

Configure automatic script in windows server

Dear Experts, I have database running,on windows server 2003 and my database are going down frequently due to some oracle bug. I need help to configure the automatic script which run's and check the database status, if database is down then send me email. Thanks in Advance. (32 Replies)
Discussion started by: Mohammed Fareed
32 Replies

5. Programming

Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.

I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning. The script is called cwrmail.pl and is located in my cgi-bin. When I... (9 Replies)
Discussion started by: BigBobbyB
9 Replies

6. Web Development

Help me in automating the recycling of UNIX server

Hello everyone...I am very new to UNIX hence needs your help in below. i have written a script to change some configuration in property files and its working fine.but to reflect that change at the application i want to recycle WAS and ihs.i.e. run below start and stop commands at /usr/local/bin ... (2 Replies)
Discussion started by: Sanaa
2 Replies

7. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

8. Windows & DOS: Issues & Discussions

Automating an UNIX Based Software Package on Windows

The company I am with is using Oracle Supply Chain Planing 8.12.1 with JDE 8.12. This is a Unix based system running on Windows Servers using Hummingbird Exceed Version 14 for interactive processing We are currently attempting to automate the Advance Planning Agent flows on a couple of... (2 Replies)
Discussion started by: pfaloney
2 Replies

9. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 Replies

10. Shell Programming and Scripting

Script to communicate from UNIX server to windows server

I have two servers linux and windows and i want to compare files which are in unix server that to windows server and find out which are missing that means i have 50 files with 6000 records in each file on linux server and i want to verify weather these 50 files are present in windows server... (5 Replies)
Discussion started by: sagar_1986
5 Replies
PYTHON-COVERAGE(1)					      General Commands Manual						PYTHON-COVERAGE(1)

NAME
python-coverage - measure code coverage of Python program execution SYNOPSIS
python-coverage -x module.py [ARG...] python-coverage -e python-coverage -r [-m] python-coverage -a [file...] DESCRIPTION
python-coverage executes a Python program and measures which of its statements are executed and which are not. It stores the information in the file .coverage in the current working directory. OPTIONS
-e Erase the .coverage file. -x Execute a Python module, giving it the remaining command line arguments. -r Produce a coverage report. -m With -r, show the line numbers that were missed by the execution. -a Annotate source files. For each source file foo, produce foo,cover, with executed lines prefixed by ">" and non-executed by "!". --help Produce a help summary. It might be more helpful than this manual page. AUTHOR
The python-coverage command is a one-line Python script which calls the coverage.py Python module to do all the work. The module was rigi- nally developed by Gareth Rees, and is now developed by Ned Batchelder. The module's home page is http://www.nedbatchelder.com/code/modules/coverage.html. This manual page was cobbled together by Lars Wirzenius for Debian, by copy-pasting from the help texts from the module. PYTHON-COVERAGE(1)
All times are GMT -4. The time now is 10:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy