atn2017 Posted March 20, 2017 Share Posted March 20, 2017 Hi there. I tried to add a cronjob on Tommy Server for a simple SQL update query on my DB using the command below, but it didn't work: mysql --user=DBUSER --password=PASS --database=DBNAME --execute="UPDATE table SET colunm=value;" I've set this cronjob to 13:30 20th MAR but nothing happened. Do you guys have any tip on the syntax I used or where can I see the log for this query ? Thanks!Paulo. Quote Link to comment Share on other sites More sharing options...
atn2017 Posted March 20, 2017 Author Share Posted March 20, 2017 I also tried running a cronjob from a php command: php -q /home/atn2017/public_html/cronjob.php But it didn´t work anyway. Any tip ? Quote Link to comment Share on other sites More sharing options...
Byron Posted March 20, 2017 Share Posted March 20, 2017 I've set this cronjob to 13:30 20th MAR but nothing happened. Do you guys have any tip on the syntax I used or where can I see the log for this query ? Thanks!Paulo. Your cron hasn't run yet. The server time is PST. As of the time of this post, it was 8:36 am. 1 Quote Link to comment Share on other sites More sharing options...
wolstech Posted March 20, 2017 Share Posted March 20, 2017 Output is sent to the default cpanel mail account (username@server.heliohost.org). You can check that mailbox via the webmail to see the results. Quote Link to comment Share on other sites More sharing options...
Byron Posted March 20, 2017 Share Posted March 20, 2017 @Krydos & wolstech, I set up a cron to test with this syntax: 35 8 * * * php -q /home/byron/public_html/php/mail.phpAnd it ran at 8:35 am PST. 1 Quote Link to comment Share on other sites More sharing options...
atn2017 Posted March 20, 2017 Author Share Posted March 20, 2017 I've set this cronjob to 13:30 20th MAR but nothing happened. Do you guys have any tip on the syntax I used or where can I see the log for this query ? Thanks!Paulo. Your cron hasn't run yet. The server time is PST. As of the time of this post, it was 8:36 am. Thanks ! I was wondering about it... Because I checked tommy time zone at http://heliohost.grd.net.pl/server-time/, but I think it's wrong.... Quote Link to comment Share on other sites More sharing options...
wolstech Posted March 20, 2017 Share Posted March 20, 2017 ...I hate timezones. I'm guessing cron honors the local timezone settings since the server clock is UTC... Quote Link to comment Share on other sites More sharing options...
atn2017 Posted March 20, 2017 Author Share Posted March 20, 2017 @Krydos & wolstech, I set up a cron to test with this syntax: 35 8 * * * php -q /home/byron/public_html/php/mail.phpAnd it ran at 8:35 am PST. @Krydos & wolstech, I set up a cron to test with this syntax: 35 8 * * * php -q /home/byron/public_html/php/mail.phpAnd it ran at 8:35 am PST. By the way, are you on Tommy ? PST right now is 8:07 AM...... Quote Link to comment Share on other sites More sharing options...
Byron Posted March 20, 2017 Share Posted March 20, 2017 It's 9:08 https://www.google.com/#q=pst+time+now&* Quote Link to comment Share on other sites More sharing options...
atn2017 Posted March 20, 2017 Author Share Posted March 20, 2017 It's 9:08 https://www.google.com/#q=pst+time+now&* well... I check up on https://time.is/PST ... it says 1h earlier..... I'll do again with 1h later.... Quote Link to comment Share on other sites More sharing options...
Byron Posted March 20, 2017 Share Posted March 20, 2017 Sorry about that. We're actually on PDT (Pacific Daylight Time). https://www.google.com/search?q=Pacific+Daylight+Time Quote Link to comment Share on other sites More sharing options...
atn2017 Posted March 20, 2017 Author Share Posted March 20, 2017 ...I hate timezones. I'm guessing cron honors the local timezone settings since the server clock is UTC... My 1st attempt was using UTC, but didn't work. I'm now trying Pacific Time..... Let's see.... It's 9:08 https://www.google.com/#q=pst+time+now&* well... I check up on https://time.is/PST ... it says 1h earlier..... I'll do again with 1h later.... Worked, @Byron ! Thanks, pal.... Sorry about that. We're actually on PDT (Pacific Daylight Time). https://www.google.com/search?q=Pacific+Daylight+Time Perfect... Is there a way to confirm it in the future ? Quote Link to comment Share on other sites More sharing options...
deep958 Posted June 14, 2017 Share Posted June 14, 2017 i am from johnny server and my cron job is also not working . plz help me Quote Link to comment Share on other sites More sharing options...
Krydos Posted June 14, 2017 Share Posted June 14, 2017 See http://www.helionet.org/index/topic/28406-my-cron-job-doesnt-work/?p=129898 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.