Finally I found the solution. Following is the solution:-
- Never use relative path in python scripts to be executed via crontab. I did something like this instead:-
import os import sys import time, datetime CLASS_PATH = '/srv/www/live/mainapp/classes' SETTINGS_PATH = '/srv/www/live/foodtrade' sys.path.insert(0, CLASS_PATH) sys.path.insert(1,SETTINGS_PATH) import other_py_files
- Never supress the crontab code instead use mailserver and check the mail for the user. That gives clearer insights of what is going.
Related Posts:
- How would I get a cron job to run every 30 minutes?
- Restarting cron after changing crontab file?
- how to search for a directory from the terminal in ubuntu
- Why is my crontab not working, and how can I troubleshoot it?
- When does `cron.daily` run?
- Job scheduling using crontab, what will happen when computer is shutdown during that time?
- How to disable everything in crontab -l?
- Running Cron every 2 hours [duplicate]
- How do I grep recursively?
- Why do you need to put #!/bin/bash at the beginning of a script file?
- error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ — Missing /var/run/mysqld/mysqld.sock
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- -bash: syntax error near unexpected token `newline’ for display command
- How do I use grep to search the current directory for all files having the a string “hello” yet display only .h and .cc files?
- SSH using python script
- Changing the resolution of a VNC session in linux
- Building HelloWorld C++ Program in Linux with ncurses
- How does “cat << EOF" work in bash?
- tar removing leading ‘/’ from member names
- X11 forwarding request failed on channel 0
- What is difference between arm64 and armhf?
- Opening a .tar.gz file with a single command
- How to make and apply SVN patch?
- How to download a file from server using SSH?
- connect to host localhost port 22: Connection refused
- Implementing shell in C and need help handling input/output redirection
- How to count lines in a document?
- What does `set -x` do?
- Can you Run Xcode in Linux?
- How to get the process ID to kill a nohup process?
- Writing a simple shell in C using fork/execvp
- Implementation of multiple pipes in C
- chmod: changing permissions of ‘my_script.sh’: Operation not permitted
- Using ls to list directories and their total sizes
- tar: add all files and directories in current directory INCLUDING .svn and so on
- What does set -e mean in a bash script?
- make -j 8 g++: internal compiler error: Killed (program cc1plus)
- Pipe to/from the clipboard in a Bash script
- what does -zxvf mean in tar -zxvf filename?
- Retrieve last 100 lines logs
- Linux Bash: Move multiple different files into same directory
- Configuring Apache for localhost
- Android – Command not found
- How to use dos2unix?
- How to add a default include path for GCC in Linux?
- How to configure both webserver and appserver for WordPress CMS?
- How to remove all plugins, posts, pages, and inactive themes in one line with wp-cli? WordPress bloatware removal
- Communcation with wordrpess and linux server [closed]
- Can scp copy directories recursively?
- Anyone else experiencing high rates of Linux server crashes during a leap second day?
- What are the functional differences between .profile .bash_profile and .bashrc
- Can I nohup/screen an already-started process?
- Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?
- Linux command to inspect TXT records of a domain [closed]
- df in linux not showing correct free space after file removal
- In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?
- Setting the hostname: FQDN or short name?
- Shell command to monitor changes in a file
- When does /tmp get cleared?
- What does a + mean at the end of the permissions from ls -l?
- Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?
- How do I sleep for a millisecond in bash or ksh
- What does ‘set -e’ do, and why might it be considered dangerous?
- What version of RHEL am I using?
- What useful things can one add to one’s .bashrc? [closed]
- How do you make it obvious you are on a production system?
- How to add a timestamp to bash script log?
- How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?
- How to remove empty/blank lines from a file in Unix (including spaces)?
- Mount CIFS Host is down
- List of files installed from apt package
- How can I kill all stopped jobs?
- How to copy a large number of files quickly between two servers
- How to copy file preserving directory path in Linux?
- Postfix – how to retry delivery of mail in queue?
- Allow SFTP but disallow SSH?
- Is it possible to alias a hostname in Linux?
- How do I list loaded Linux module parameter values?
- Does getting disconnected from an SSH session kill your programs?
- Tips for Securing a LAMP Server
- What Linux distribution is the Amazon Linux AMI based on?
- What is this IP address: 169.254.169.254?
- How can I export the privileges from MySQL and then import to a new server?
- Is there a directory equivalent of /dev/null in Linux?
- Can I send some text to the STDIN of an active process running in a screen session?
- How can I get processor/RAM/disk specs from the Linux command Line? [duplicate]
- Should I install Linux applications in /var or /opt?
- Is there a way to see the execution tree of systemd?
- How to determine the hostname from an IP address in a Windows network?
- Heartbleed: how to reliably and portably check the OpenSSL version?
- create home directories after create users
- How can I fully log all bash scripts actions?
- How do I redirect subdomains to a different port on the same server?
- How to check the physical status of an ethernet port in Linux?
- What does “debconf: delaying package configuration, since apt-utils is not installed” mean?
- Testing UDP port connectivity
- In Linux, what is the difference between “buffers” and “cache” reported by the free command?
- memcache vs memcached?
- zcat/gzcat works in linux, not on osx. general linux/osx compatibility
- What is the debian-sys-maint MySQL user (and more)?