last day (15 days later) » 

8:42 AM
0
A: how to run a python script after running a scala spark app

Romeo NinovFirst you have error in your line of cron. You need to have 3 *, not 4 30 0 * * * ... next the good practice for cron is to create shell script which will run the commands. And in this script add sourcing of you .bashrc or/and .bash_profile to set your environment variables to be the same as w...

 
4 * is just a typing mistake in question, my scala script ran using the above mentioned command in the question but python script didn't run after scala`s completion
 
@experiment, please check my edited andwer
 
I have to mention the time in bashrc?
 
@experiment, what do you mean by "mention the time in bashrc"? the time is defined in cron record
 
not able get why you mentioned the command in bashrc?
 
8:42 AM
You mention in few comments above. You should source this file to load your environment variables, PATH, etc
 
please give a detailed solution,I am new to this,not able pick through the above solution
and aren't they both similar,setting directly in crontab and setting it through bash file? why is only my scala script running and python script doesnt after scala script`s completion?
 
To provide complete solution it's required to know a lot of details. Moreover SE is not scripting service, we can provide support only based on the information OP provide
 
i have given all the details,what more do you require?
 
You should provide entire log from scala as well as error codes and so on
 
there is no error while running scala script ,runs smoothly and closes
there is no error lines anywhere
 
8:47 AM
Have you try my edited script?
 
will try it
just now saw that you edited it
 
no problem :)
 
9:14 AM
. /path/to/your/home/directory/.bashrc what do I have mention in this?
 
Here i mean the path to your home directory
 
how will I get it?
any command?
 
login in your account and exec
echo $HOME
 
9:30 AM
?
created a bash file ,now I have mention the bash file into cron tab
01 15 * * * /home/deevisha/.hello_world
like this?
 
right. DO not forget to make it executable:
chmod +x /home/deevisha/.hello_world
 
9:44 AM
only scala script works
 
check what scala return as error code. and change the script accordingly
 
no error code
for testing,I had just a print statement
scala part is printing fine
 
check documentation of scala how to understand if the program execute fine. I have no idea
 

last day (15 days later) »