Sponsored Content
Top Forums UNIX for Dummies Questions & Answers CRONTAB - one python script is not running Post 302945242 by bartocham on Wednesday 27th of May 2015 01:15:32 PM
Old 05-27-2015
CRONTAB - one python script is not running

Hi!

I'm using a RaspberryPi with standard Raspbian.
Currently I'm working on some sort of weather station.

For now I have three python scripts - one which is updating txt files for website - update1m.py ( it will not be necessary in few next days so I'll delete it) , second one for updating mysql datebase with measurement - updateDB.py and the last ( this one is generating problem ) for generating chart out of measurements gathered in database.

I'm a beginner so propably my methods are as dumb as it is possible but this is the reason why I'm asking you for help.

Via command line im running - sudo crontab -e.
My crontab looks like this:

Code:
@reboot python /home/pi/meteo/update1m.py

@reboot python /home/pi/meteo/database/updateDB.py

@reboot python /home/pi/meteo/imag.py

*/1 * * * * python /home/pi/meteo/update1m.py

*/1 * * * * python /home/pi/meteo/database/updateDB.py

*/1 * * * * python /home/pi/meteo/imag.py

First two scripts are running properly after reboot and every minute.
Unfortunatelly last one imag.py is not running with cron. It is working properly if I simply execute it with python ./imag.py but not with cron.
I'm sure that path for script is ok.

Do you have any idea why it is acting like that?

Regards,
Mateusz
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A command in a script not running in Crontab.

Hi, I made this script for TRU Unix 5.1 OS based Node. When the script was run manually all the commands were running properly. But when it was run from Crontab, one command is not running. This command is not running when the script is running from Crontab: #... (2 Replies)
Discussion started by: mystition
2 Replies

2. UNIX for Dummies Questions & Answers

Getting error when running script through crontab

Hi all, I wrote small script for Solaris and when I am running it through command prompt its ok, but when I trying to run it using crontab, i am getting error like: ld.so.1: dbloader: fatal: libACE.so: open failed: No such file or directory /tmp/file.sh: line 5: 8304 Killed ... (4 Replies)
Discussion started by: nypreH
4 Replies

3. Red Hat

Problems with script running with crontab

Hi, I'm trying the backup a few information commands of my Check Point FW (it's on a SPLAT linux machine). This is the script I wrote: #!/bin/bash cd /var/tmp/ file1=netstat_`/bin/date +%d%m%y`.txt file2=ifconfig_`/bin/date +%d%m%y`.txt file3=cpstatos_`/bin/date +%d%m%y`.txt... (2 Replies)
Discussion started by: nirsh
2 Replies

4. Programming

Running programs from a Python script

Any idea how I can run a program from a phyton script? For example, in csh I will do $tpath/tsimplex base=$fbase data=$fdata restore=$frestore \ nxp=$nx nzp=$nz param=$param intp=$intp nlay=$nlay \ varp=$varp sigma0=$sigma maxiter=$maxiter tol=$tol \ ... (2 Replies)
Discussion started by: kristinu
2 Replies

5. Shell Programming and Scripting

Crontab not running a script

Hi, I posted this in the Solaris forum but I think this one would be more appropriate. I created a script starting with the following lines: #!/usr/bin/ksh flag=n export flag typeset -i quant=0 (...) When running it I'm getting the following 2 errors: /tmp/tstscript/testfail.ksh:... (9 Replies)
Discussion started by: Cvg
9 Replies

6. UNIX for Advanced & Expert Users

Particular script not running through crontab

Hi, I have created the below script, set -x # Set the Path of Environment file ENV_FILE_DIR=/opt/app/p1trp1c1/sybase/ecdwqdm/xrbid/QDM_Prod/bin LOG_DIR=/opt/app/p1trp1c1/sybase/ecdwqdm/xrbid/QDM_Prod/log export ENV_FILE_DIR export LOG_DIR # Set Audit Environment . ${ENV_FILE_DIR}/QDM.env... (8 Replies)
Discussion started by: yohasini
8 Replies

7. UNIX for Dummies Questions & Answers

crontab not running script

Hi All, I am having the below script to be run from crontab, it it doesnt run. 1 * * * * /home/cobr_ext/test.sh > /home/cobr_ext/temp.txt when i run i manally it runs without any issues. Could please help me as to why doesnt it run the script.:( (7 Replies)
Discussion started by: abhi_123
7 Replies

8. Shell Programming and Scripting

Delay in running script from crontab

I am facing an issue where sometimes crontab is running script with some delay. Below is the stmt in script and it is the only stmt in script. echo "running at `date` " >> CRONCHECK.log Below is the cron entry. 0 11 * * * CRONCHECK.sh Below is the time of run each day. running at Fri... (8 Replies)
Discussion started by: Nishant Singh
8 Replies

9. Solaris

Script problem when running on crontab

Hi guys! I created a backup script that works fine when I run manually, but when I put a crontab job to execute it the result are not the expected. (not a time problem). Here is my script: bash-3.00# cat /bk_tool/backup2.sh #!/usr/bin/csh clear set DIR_HOST='SCP08' ... (3 Replies)
Discussion started by: andredemartini
3 Replies

10. Programming

Running python script in cygwin

I have python installed here on windows: C:\Python27 and can run a script from the command line but would rather use cygwin. $ cd "C:\Users\cmccabe\Desktop\annovar" cmccabe@DTV-L2231M5J /cygdrive/c/Users/cmccabe/Desktop/annovar $ python run_batch_job.py Traceback (most recent call last):... (3 Replies)
Discussion started by: cmccabe
3 Replies
yhsm-decrypt-aead(1)					      General Commands Manual					      yhsm-decrypt-aead(1)

NAME
yhsm-decrypt-aead - Decrypt AEADs (with secrets for YubiKeys) SYNOPSIS
yhsm-decrypt-aead [options] --aes-key KEY file-or-dir [...] DESCRIPTION
Decrypt AEADs generated using a YubiHSM. NOTE that this requires knowledge of the AES key used in the YubiHSM. After a number of YubiKey secrets have been generated using yhsm-generate-keys(1) , this tool can decrypt them and produce a CSV file usable to personalize corresponding YubiKeys. OPTIONS
-v, --verbose Enable verbose operation. --debug Enable debug printout. --format str Select output format (raw or yubikey-csv). --print-filename Prefix any output with the input filename. --key-handle kh Key handle used when generated AEADs, if not stored in the AEAD file (AEAD generated with python-pyhsm 1.0.3 or lower). --aes-key hexstr AES key used to generate the AEADs. EXIT STATUS
0 OK 1 Fail BUGS
Report python-pyhsm/yhsm-decrypt-aead bugs in the issue tracker <https://github.com/Yubico/python-pyhsm/issues/> SEE ALSO
The python-pyhsm home page <https://github.com/Yubico/python-pyhsm/> YubiHSMs and YubiKeys can be obtained from Yubico <http://www.yubico.com/>. python-pyhsm June 2012 yhsm-decrypt-aead(1)
All times are GMT -4. The time now is 05:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy