title: os.system returns the value 256 when run from crontab
body: <p>My code runs perfectly when I run the code via command line, but when the system tries to run the code using cron it doesn't execute the other file. <code>os.system(file)</code> returns the value 256 and I'm not able to understand the reason.</p>
  
  <pre><code>from datetime import datetime, timedelta
  import requests
  import os
  print(1)
  
  #Login API to get the token
  reqLogin = requests.post('http://139.162.29.201:3001/auth/sign_in', json = {'email': 'aa', 'password': 'aa'})
  reqLogin = reqLogin.json()
  print(2)
  #Get all the clients
  reqClient = requests.request('GET', 'http://139.162.29.201:3001/clients', headers = {'Authorization': 'JWT '+ reqLogin['token']})
  reqClient = reqClient.json()
  print(3)
  #Initialize time
  #time = (datetime.now() + timedelta(hours = 5, minutes = 30)).strftime('%H:%M:%S')
  time = "05:59:50"
  timeInSecondsList = time.split(":")
  time = timedelta(hours = int(timeInSecondsList[0]), minutes = int(timeInSecondsList[1]))
  print(4)
  #Initialize date
  dateTime = (datetime.now() + timedelta(hours = 5, minutes = 30)).strftime('%Y-%m-%d')
  dateTimeYesterday = (datetime.now() + timedelta(days = -1, hours = 5, minutes = 30)).strftime('%Y-%m-%d')
  print(5)
  for eachClient in reqClient:
      #Get the shift timing against the client
      reqShiftTiming = requests.post('http://139.162.29.201:3001/getShiftTiming', headers = {'Authorization': 'JWT '+reqLogin['token']}, json = {'clientId': eachClient['clientId']})
      reqShiftTiming = reqShiftTiming.json() 
      print(6)
      shiftAList = reqShiftTiming[0]['shiftA'].split(":")
      shiftBList = reqShiftTiming[0]['shiftB'].split(":")
      shiftCList = reqShiftTiming[0]['shiftC'].split(":")
      print(7)
      if time == timedelta(hours = int(shiftBList[0]), minutes = int(shiftBList[1]) - 1):
          print(8)
          file = 'python /quad/finalMachineEfficiency.py '+ eachClient['clientId'] + ' ' + timeInSecondsList[0] + ':' + timeInSecondsList[1] + ' ' + dateTime
          os.system(file)
          print(os.system(file))
      if time == timedelta(hours = int(shiftCList[0]), minutes = int(shiftCList[1]) - 1):
          print(9)
          file = 'python /quad/finalMachineEfficiency.py '+ eachClient['clientId'] + ' ' + timeInSecondsList[0] + ':' + timeInSecondsList[1] + ' ' + dateTime
          os.system(file)
          print(os.system(file))
      if time == timedelta(hours = int(shiftAList[0]), minutes = int(shiftAList[1]) - 1):
          print(10)
          file = 'python /quad/finalMachineEfficiency.py '+ eachClient['clientId'] + ' ' + timeInSecondsList[0] + ':' + timeInSecondsList[1] + ' ' + dateTimeYesterday
          os.system(file)
          file2 = 'python /quad/finalOee.py ' + eachClient['clientId'] + ' ' + timeInSecondsList[0] + ':' + timeInSecondsList[1] + ' ' + dateTimeYesterday
          os.system(file2)
          print(os.system(file), os.system(file2))
  print("callefficiency.py ended", dateTime)
  </code></pre>
  
  <p><strong>output by commandline</strong></p>
  
  <pre><code>callefficiency.py started
  1
  2
  3
  4
  5
  6
  7
  10
  finalMachineEfficiency.py started 2017-12-14
  finalMachineEfficiency.py ended 2017-12-14
  finaloee.py started 2017-12-14
  finaloee.py ended 2017-12-14
  finalMachineEfficiency.py started 2017-12-14
  finalMachineEfficiency.py ended 2017-12-14
  finaloee.py started 2017-12-14
  finaloee.py ended 2017-12-14
  0 0
  6
  7
  10
  finalMachineEfficiency.py started 2017-12-14
  finalMachineEfficiency.py ended 2017-12-14
  finaloee.py started 2017-12-14
  finaloee.py ended 2017-12-14
  finalMachineEfficiency.py started 2017-12-14
  finalMachineEfficiency.py ended 2017-12-14
  finaloee.py started 2017-12-14
  finaloee.py ended 2017-12-14
  0 0
  6
  7
  10
  finalMachineEfficiency.py started 2017-12-14
  finalMachineEfficiency.py ended 2017-12-14
  finaloee.py started 2017-12-14
  finaloee.py ended 2017-12-14
  finalMachineEfficiency.py started 2017-12-14
  finalMachineEfficiency.py ended 2017-12-14
  finaloee.py started 2017-12-14
  finaloee.py ended 2017-12-14
  0 0
  6
  7
  10
  finalMachineEfficiency.py started 2017-12-14
  finalMachineEfficiency.py ended 2017-12-14
  finaloee.py started 2017-12-14
  finaloee.py ended 2017-12-14
  finalMachineEfficiency.py started 2017-12-14
  finalMachineEfficiency.py ended 2017-12-14
  finaloee.py started 2017-12-14
  finaloee.py ended 2017-12-14
  0 0
  callefficiency.py ended 2017-12-15
  </code></pre>
  
  <p><strong>Output by cron</strong></p>
  
  <pre><code>callefficiency.py started
  1
  2
  3
  4
  5
  6
  7
  10
  256 256
  6
  7
  10
  256 256
  6
  7
  10
  256 256
  6
  7
  10
  256 256
  callefficiency.py ended 2017-12-15
  </code></pre>
  
  <p>I want to know what can be the possible reasons and what can I do to get this error solved.</p>